简体   繁体   中英

Twitter API V2 - Request failed 429: too many requests

I'm using the Twitter API V2, and I'm trying to retrieve all the followers of a specific user.

According to the Twitter API docs, the maximum number of followers I can retrieve in a single request for a specific user is 100.

Assuming the user has more than 100 followers; to retrieve the next 100 followers, I need to make another request and pass a pagination token as a parameter in my next request.

The problem is that the Twitter API's rate limit on retrieving followers is 15 requests per 15 min window.

So, if I try to retrieve all followers of a user who has 1500 followers or more, I get a 429 status code error saying "Too many requests".

Is there any solution or trick to get over this error? because most of the time I would want to retrieve followers of users who have more than 1500 followers.

I'm using JavaScript.

You have to wait your 15 minutes with the standard API from Twitter. But you could try and request premium API access with this link: https://developer.twitter.com/en/docs/twitter-api/premium

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM