Hanzo Hasashi
Hanzo Hasashi

Reputation: 121

Can somebody explain Twitter API rate limit in plain English?

I'm building a Twitter app and so far I'm the only person using it so I've never had any issues with the Twitter Rest API rate limit, however, it's about time I implement some safeguarding procedures. I am already using caching etc but my problem is that I don't understand a word from Tiwtter's own explanation about the rate limit. Wondering if you could help.

This bit from Twitter's FAQ:

If user A launches application Z, and app Z makes 10 calls to user A’s mention timeline in a 15 minute window, then app Z has 5 calls left to make for that window

Surely they mean something like this, right?

If user A launches application Z, and app Z makes 10 calls to user A’s mention timeline in a 15 minute window, then app Z has 5 calls left to make for user A within that window

Otherwise, if I've got 1000 users and they all want to run the app simultaneously, then User A will make 10 calls, User B will make 5 calls and users C to X997 will wait in the queue for 5 years?

Upvotes: 4

Views: 352

Answers (1)

Terence Eden
Terence Eden

Reputation: 14324

Your understanding is correct. If you read the next part of the documentation

  • Then user A launches application X, and app X calls user A’s mention timeline 3 times, then app X has 12 calls left for that window
  • The remaining value of calls on application X is isolated from application Z’s, despite the same user A

So your app doesn't have a rate limit for all users - just per user.

So, if Alice and Bob are both users of your app, they each get their own rate limits. If Alice uses up all of hers, Bob is not affected.

If in any doubt, you can check the rate limits for each user.

Upvotes: 2

Related Questions