Error: Rate limit exceeded


#1

How can we manage this error while running the same api request inside a loop. It is a must for us to run it via loop as we have lot of Twitter accounts and we need to go through each and every accounts.

This is the error we are getting…
{ “errors”: [ { “code”: 88, “message”: “Rate limit exceeded” } ] }

What we need ultimately is to get all the replies of posts that has been posted to Twitter.
Please let us know, if there is any alternate solution for this.

Thank You.


#2

You can take a look at x_rate_limit_remaining in the header response.

You can also stage your API calls. If you’re only allowed 180 calls/15 minutes, then you know you can only call the end point every 5 seconds.