503 Service unavailable for specific campaign ids


#1

Using the REST API I was able to pull data when I asked for one campaign at a time but when I asked for these campaign ids together I received a 503 Error.

Campaign ids: 2sixi,2sj05,2sr8v,2sqwm,2sr8n,2sr9p

https://ads-api.twitter.com/0/stats/accounts/v9qdu/campaigns?campaign_ids=2sixi%2C2sj05%2C2sr8v%2C2sqwm%2C2sr8n%2C2sr9p&start_time=2015-07-20&end_time=2015-08-19&granularity=DAY&segmentation_type=CONVERSION_TAGS

Is there some configuration I can do to avoid this error?


#2

You should have a look at our Analytics Best Practices docs which talk about how to best get results from our analytics endpoints in depth.

For example, looking at 503 errors in particular, from that page you can find this information:

On queries that result in an HTTP 503 Service Unavailable status code, you must inspect the retry-after header and retry only after the time indicated.


#3

This call is still returning 503 even after following analytics best practices with exponential retry logic after reading the retry-after header.

Any other suggestions?


#4

Have you tried breaking your requests down into smaller chunks? You are trying to get campaign stats for a month across 6 campaigns, so there is no harm in trying to pace yourself in how to get that information.