Reaching secondly limit


#1

My code limits requests to the HubSpot API to 10 requests per second. We’re getting 429 errors with a body like:

{"status":"error","message":"You have reached your secondly limit.","errorType":"RATE_LIMIT","correlationId":"cb13d84c-40c7-41ad-94db-bb48d2fdf079","groupName":"publicapi:oauth-secondly:39806:2127247","policyName":"SECONDLY","requestId":"85696e6292794eff1163abcff5c8c762"}

We have other HubSpot integrations using the API, such as Salesforce, but I didn’t think that would be an issue since the docs say that the rate limits are per access token (https://developers.hubspot.com/apps/api_guidelines).

Are the limits actually per account instead of per access token?


#2

@Joshua_Karstendick You might want to try slowing down the calls a tad as sending every call perfectly 10 times a second or every 100 milliseconds can be cutting it really close on the server-side . If you run into a 429 you could catch the error and then wait a second and continue making requests.


#3

@pmanca Thanks for the response. I’ll try dialing down to 9 requests per second and add backoff to my requests.

I still don’t understand whether or not I have my own rate limit for my own access token. Could you clear that up for me?


#4

@Joshua_Karstendick Each access token has the rate limit applied to it individually.