Jinu Santh Rose
Jinu Santh Rose

Reputation: 323

Is user rate limit for token or user in Facebook API?

I just want to know the user rate limit calculated in Facebook API is for user id basis or token basis.I have 2 access token for the same userid for the same app.Could i make 600calls/600sec/token? Can anyone help me?

Upvotes: 1

Views: 1823

Answers (2)

JakeVR
JakeVR

Reputation: 121

Rate limit is calculated on both, per account basis (limit is undocumented) and per token basis (token from each user adds ability for the app to make additional 200 calls per hour). Rate Limiting - Graph API

  • Account Level, on a per user basis. The total max number of calls from all tokens which belong to a user (to different apps) is not known. This type of rate limit throws Error Code 17.

    These limits apply to calls made using user access tokens. Your app will receive error code 17 if this limit is reached. This happens when a specific user account is making too many calls to the API. Note:This can include user calls made over many apps and not just yours.

  • Application level, on per-token basis (only one token from one user per app), and it's documented (Error Code 4):

    The total number of calls your app can make per hour is 200 times the number of users. This isn't a per-user limit; any individual user can make more than 200 calls per hour, as long as the total for all users does not exceed the app maximum. For example, if your app has 100 users, the app can make 20,000 calls per hour.

So,

  • token can add 200 additional calls to your app (if App hits limit, all API calls with all tokens generated for this app get error code 4),

and

  • the user is allowed to make some (undocumented) amount of API calls per all apps (if the user hits limit, all API calls with all tokens generated for this user get error code 17)

Upvotes: 2

jehna1
jehna1

Reputation: 3130

200 API calls / user / hour

So each access token for unique user has it's own 200 calls per hour. If you use app token, you have just total of 200 requests per hour.

Source: https://developers.facebook.com/docs/graph-api/advanced/rate-limiting

Edit:

Only applies to Graph API. For Marketing API, see the Marketing API rate limiting

Also note that a single HTTP request can count as multiple API requests. For example the following request counts as 3 API requests:

https://graph.facebook.com/photos?id=4,5,6

Upvotes: 1

Related Questions