There were too many calls with this ad account. Wait a moment and try again.

I am trying to retrieve reporting data from our account. I need to make asynchronous calls, because otherwise I would get an error so that the data is old.

When I create several requests, I get the error: "There were too many calls with this account. Wait a bit and try again."

In a short time, I made about 30 queries because of how async reports work. Is there a better way to get reporting data? And if there is no way to see the query score mentioned in the documentation?

And another question will be, is there a difference in the number of requests when your application is in development access?

Thanks in advance, Jorik

+5
source share
1 answer

The first point, according to the documents of the access level, there is a significant speed limit for applications under development.

Secondly, there are several endpoints for extracting reports, which, for example, account reports, a wise campaign report, advertising messages, here is a link to documents for the API Insights available options:

  • act_AD_ACCOUNT_ID / ideas
  • CAMPAIGN_ID / ideas
  • ADSET_ID / ideas
  • ad_id / ideas

Finally, about speed limits in marketing api. This is done as a sliding window method, which means that there is no actual trace of the number of requests per day or something like that, simply because it does not require many requests in a short period of time.

two things you can do, first look at the api response, and if the answer is ratelimit error, stop the request. secondly use batch requests

The following is an overview of the troubleshooting guide. Troubleshooting

Timeouts

The most common problems causing this endpoint to fail are too many requests and timeouts:

On / GET or synchronous requests, you may receive errors if there is no memory or timeout. On / POST or asynchronous requests, you may receive timeout errors. Asynchronous requests may take up to an hour to complete, including retries. For example, if you make a request that tries to extract a large amount of data for many ad-level objects. Recommendations

There is no explicit restriction on when a request fails. When time runs out, try breaking the query down into smaller queries by inserting filters such as a date range. Unique metrics take a long time to compute. Try to request unique metrics in a separate call to improve the performance of custom metrics. Speed ​​Limit

The Facebook Insights API uses a speed limit to provide the best level of reporting for all of our partners. For more information and suggestions, see API Limitations for Insights APIs and Best Practices.

0
source

Source: https://habr.com/ru/post/1203591/


All Articles