Question

How to check user token limits? and why, when the maximum number of queries, requests continue to send? Maximal limit is 5000 requests.

Était-ce utile?

La solution 2

The API documentations says:

Be nice. If you're sending too many requests too quickly, we'll send back a 503 error code (server unavailable).

So I guess you should look for a 503 as your indication that you've hit the limit. I haven't actually verified that this is the case, but it appears they have an Apigee front end, so I suspect it would work as stated.

Autres conseils

The response header for Instagram API has information on API limit and how much has been used.

Look for X-Ratelimit-Remaining and X-Ratelimit-Limit

Cache-Control:private, no-cache, no-store, must-revalidate
Connection:keep-alive
Content-Encoding:gzip
Content-Language:en
Content-Length:10117
Content-Type:application/json; charset=utf-8
Date:Thu, 20 Mar 2014 17:18:46 GMT
Expires:Sat, 01 Jan 2000 00:00:00 GMT
Pragma:no-cache
Server:nginx
Max-Age=31449600; Path=/
Vary:Cookie, Accept-Language, Accept-Encoding
X-Ratelimit-Limit:5000
X-Ratelimit-Remaining:4995

If you exceed the limit then you will get a HTTP 400 response, with a JSON response that has error_message that API limit has exceeded.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top