How does throttling work?

The way throttling works depends on which authentication method you are using.

OAuth2

You are limited to a total of 125,000 api calls per day (25 calls per second max) across all Infusionsoft applications you are sending data to.

Legacy API Key

The throttling system is setup like a bank account. You have so many dollars (will be called tokens) in that account you can use. Every Infusionsoft Application has a bank of 10,000 tokens. For every API call that is made, 1 token gets removed from that bank. However, for every 500ms that there is not an API call, you get one token back in the bank, up to the max of 10,000 tokens.

When you run out of tokens, your API call gets delayed 500ms until you get a new token. For instance, you are out of tokens and you have 4 API calls come in at the same time. The first one will be delayed 500ms, the next one 1 second then 1.5 seconds and finally 2 seconds.

Once you hit 4 threads being throttled, you will then start to receive an error stating you have been throttled. The only way to become un-throttled is to cease all API calls. It takes approximately 1.5 hours of no API calls to regenerate all 10,000 tokens. You will recieve the following error:

Server returned a fault exception: [500] Server encountered exception: com.infusionsoft.throttle.ThrottlingException: Maximum number of threads throttled

Posted in: API