I've received a notification that my app has reached 100% of the hourly rate limit and all API calls to my app will fail until it falls below the throttling limit.
This was also part of the notification:
Here's a breakdown of the methods causing your app to hit the rate limit:
By Call Count:
GET {shadow-ig-media-id}/comments 102%
What is this {shadow-ig-media-id} means? I couldn't find anything about it. Also, my average API activity shows 0 calls for the last 7 days, which couldn't be correct if I hit the rate limit.
I'm using the latest API endpoint with the official Facebook PHP SDK.
Related
I'm trying to grab 200 Google Plus Activities posts for a dashboard I'm creating. But there is a max limit of 20 posts per request, and a next page token is given. Because I have to use the nextpagetoken from the previous response to make the next request, I'm not sure how I can make the requests in parallel. It takes about 1 second to get a response, so for 10 requests this is taking around 10 seconds, which is a very long time for a search result of a dashboard to load.
Do anybody have any suggestions?
Thanks!
The Max results per page limit for activities.search is 20 you can't increase that.
You can not run these requests in parallel as there is no way for you to calculate the next page token that is created for you by Google. Even if there was you would end up hitting the flood protection quota.
1 second to get a response isnt bad IMO for a free api that you are not paying for. You need to work with in the limits that Google has set for the API. Even if you want to go faster you can't if Google won't allow it.
If a merchant needs to send Facebook messages via mobile numbers (chatbot), what is the rate limit?
This is a link on this topic but it does not talk about the actual limit:
https://developers.facebook.com/docs/messenger-platform/send-api-reference#errors
This is graph api rate limit:
https://developers.facebook.com/docs/graph-api/advanced/rate-limiting
Thanks!
There are two major types of rate limits that can be encountered by your app, application-level rate limiting and page-level rate limiting.
At Application level limit is:
200 calls/person/hour
which will give you error code:4
At Page level limit is:
4800 calls/person/24-hours
which will give you error code:32
Great description Available Here in this reference.
The updated documentation from Facebook clearly lists out 250 calls per second as a safe limit for the Send API.
The Send API does not have a fixed rate limit, but you can safely send 250 requests per second.
More info here: https://developers.facebook.com/docs/messenger-platform/send-messages#limits
We are getting the below issue when querying facebook graph API
(#17) User request limit reached
i know that this is a throttling error on user level rate limiting as mentioned in the below link
https://developers.facebook.com/docs/marketing-api/api-rate-limiting
But we were never facing the issue before, suddenly this issue has started coming, Did facebook changed the rate limits recently ?
does anybody have any idea ?
AS Per doc:
Your app can make 200 calls per hour per user in aggregate. As an example, if your app has 100 users, this means that your app can make 20,000 calls. This isn't a per-user limit, so one user could make 19,000 of those calls and another could make 1,000. This limit is calculated based on the number of calls made in the previous hour.
The number of users for your app is calculated as the average number of daily active users plus today's new logins
Not all API calls are subject to rate limits so the number of calls you make may not match what you see in the rate limit tool. Facebook also throttles calls based on CPU time used and total time. It is difficult to hit these limits, so it is an extremely rare occurrence. This information is exposed in the detail pane for each sample. Click on the graph in the rate limit tool on your dashboard for details.
Recommendations:
Rate limiting defines limits on how many API calls can be made within a specified time period. When a rate limit is exceeded, all API calls from an app are throttled and fail for a brief period of time. Once an app is throttled, the caller will get an error for subsequent calls with error code = 4, CodedException. It can take up to an hour for your requests to be accepted again.
To avoid rate limiting:
Spread out queries evenly between two time intervals to avoid sending traffic in spikes. Use filters to limit the data response size and avoiding calls that request overlapping data. Use the rate limiting header to dynamically balance your call volume.
You called API too many times (working too hard, huh?). This is how Facebook calculates the Limit. ref: link
I know that fb have made available some documentation about the requests limits to the api https://developers.facebook.com/docs/marketing-api/api-rate-limiting,
but it is not clear how each api call is calculated...
i.e, If I want to get stats for ~10,000 adsets, how can I evenly space the time between the calls ?
The best answer i could find for this question from another SO thread -
"After some testing and discussion with the Facebook platform team, there is no official limit I'm aware of or can find in the documentation. However, I've found 600 calls per 600 seconds, per token & per IP to be about where they stop you. I've also seen some application based rate limiting but don't have any numbers.
As a general rule, one call per second should not get rate limited. On the surface this seems very restrictive but remember you can batch certain calls and use the subscription API to get changes."
Source - What's the Facebook's Graph API call limit?
Official Doc-: https://developers.facebook.com/docs/graph-api/advanced/rate-limiting
Rate limits are imposed on each app. The rate limiting tool gives you information about how close your app is to being throttled. Click on any sample to get more detail on the types of utilization.
Your app can make 200 calls per hour per user in aggregate. As an example, if your app has 100 users, this means that your app can make 20,000 calls. This isn't a per-user limit, so one user could make 19,000 of those calls and another could make 1,000. This limit is calculated based on the number of calls made in the previous hour.
Source-: https://developers.facebook.com/docs/graph-api/advanced/rate-limiting
Heavily rate-limited per ad account. For development only. Not for production apps running for live advertisers.
I have an app for Android which checks for new notifications from Facebook every N minutes, where N is more than 5 minutes (default is 30 minutes). That app also makes some user-generated requests to Facebook's Graph API.
Recently (since the moment we added scheduled polling for new notifications), Facebook started to limit our app (with error #17 "User request limit reached" mostly, but sometimes it gives error #4 "Application request limit reached").
The Insights Dashboard gives us following statistics: 255,000 requests per day, 432 users. That gives roughly 590 requests per user per day, which is far from any mentioned limit for API I was able to find.
Facebook's information on rate limiting is really vague, here are some numbers you can usually find in different sources:
600 calls per 600 seconds per token per IP.
100M calls per day per app.
10,000 calls per user token per day.
The scheduled requests which our app does on a regular basis is a simple FQL:
SELECT sender_id,created_time,title_text FROM notification WHERE recipient_id=me() AND is_hidden = 0 AND is_unread = 1
Even with the minimal update interval of 5 minutes, it will be fired 288 times per day.
We tried to replace this request with Graph API call, but it didn't change a thing.
I know that there are other apps that have similar functionality and they seem to not have these limitations.
Does anybody know if there are any way to avoid being limited by Facebook with such reasonably low amount of calls?
Thanks!
It turned out that there was a nasty bug in the code which was really hard to reproduce, that sometimes forced the app to make API requests in a loop for 10-30 minutes in a row. Only a small percent of clients had that problem, but it was enough to bump into API limits.
It seems that FB API calculates limits based on the number of users of the app, so even with a rather limited amount of calls we had a rate limiting problem.
Another observation is that despite the fact that only a limited number of users were doing a lot of API calls, FB did limiting for all users.
Hope that information will be helpful somehow to resolve similar issues.