Twitter api v1.1 rate limit inconsistent with documentation


#1

After reading the rate limiting documentation for the v1.1 of the twitter rest API (https://dev.twitter.com/docs/rate-limiting/1.1) i understand that any application can only create n calls (e.g. GET users/lookup is allowed 180 calls per 15 minutes) and the amount of users ‘subscribed’ to an application is not taken into account.

If i test against the v1.1 and make calls towards users/lookup from a single application (consumerkey and consumersecret) for 2 seperate ‘subscribed’ users (accesstoken and accesssecret), the ratelimit headers seem to only deduct 1 call per user. I expected the rate limit to be enforced on per application level.

This seem to contradict - anyone can help?

From twitter website

Rate limits on “reads” from the system are defined on a per user and per application basis, while rate limits on writes into the system are defined solely at the user level. In other words, for reading rate limits consider the following scenario:

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
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

#2

That segment you’re quoting from is more about the boundaries between applications and users using applications… it could be made clearer, I agree.

Rate limits in API v1.1 are per-application and per-user within that application. So when you see that you can 180 requests to a method per every 15 minutes, that’s 180 requests you can do while leveraging an access token belonging to a user. Each access token, when leveraged, has 180 requests to make per rate limit window in that context. If you have a 1000 users, your application can prospectively make 180,000 requests to such an endpoint per 15 minutes – of course, that’s provided you actually needed to make that many requests…

Your usage of a user’s access token has no effect on their access tokens in an other application (that’s the part this area of the doc was trying to make clear).


#3

Hi Taylor,

Thanks for clearing this up! I kinda assumed that that would be the case but the text did throw me off for a moment. Maybe the text should be updated, or clarified with additional examples.

Anyways, thank you!

Frank