Unexpected Error with stats cost limit



We have started to detect issues obtaining stats in promoted_tweet and line_items levels.

We’re getting this error message:

    "message":"Cost limit exceeded"


But we have this response headers:

"content_disposition":"attachment; filename=json.json",
"date":"Thu, 15 Oct 2015 10:32:45 GMT",
"set_cookie":"guest_id=v1%3A144490516501237443; Domain=.twitter.com; Path=\/; Expires=Sat, 14-Oct-2017 10:32:45 UTC",
"x_xss_protection":"1; mode=block"

Could you check this?



Hello Hector,

The error message indicates that you have no more ‘cost’ remaining for this rate limit window based upon our cost rate limiting scheme for analytics endpoints.

Please see https://dev.twitter.com/ads/analytics/best-practices and implement an algorithm for appropriately waiting and breaking up analytics calls in order to comply with the rate limiting, and double check that you are appropriately not oversharing tokens which will also make rate limiting much more difficult to deal with.




Hi John.

Thanks for you response.

Of course! You’re right. I don’t know whi but I was reading “x_rate_limit_remaining” instead of “x_cost_rate_limit_remaining”