We have been in touch with a POC at Twitter who suggested we reach out on the forum for an update.

  • We appear to be experiencing the issue listed here.
  • We attempted the workaround and it appears to be unrelated. This is a redacted response we received:
"​<FAILED":{
   "u""status":"u""FAILED",
   "u""created_at":"u""YYYY-MM-DDTXX:XX:XXZ",
   "u""placement":"u""ALL_ON_TWITTER",
   "u""metric_groups":[
      "u""ENGAGEMENT",
      "u""BILLING",
      "u""MOBILE_CONVERSION",
      "u""VIDEO"
   ],
   "u""url":"None",
   "u""country":"None",
   "u""start_time":"u""YYYY-MM-DDTXX:XX:XXZ",
   "u""updated_at":"u""YYYY-MM-DDTXX:XX:XXZ",
   "u""expires_at":"None",
   "u""entity":"u""PROMOTED_TWEET",
   "u""platform":"None",
   "u""id_str":"u""XXXXXXX",
   "u""granularity":"u""DAY",
   "u""entity_ids":[
      "u""XXXXX",
   ],
   "u""segmentation_type":"u""PLATFORMS",
   "u""id":XXXXX,
   "u""end_time":"u""YYYY-MM-DDTXX:XX:XXZ"
},
[{'x-concurrent-job-limit-remaining': '98'}]

QUESTIONS

  1. Please can you confirm that this is indeed the same issue as mentioned here
  2. Can we please have an update or workaround? There has been no update for 8 days.
1 Like

Could you provide your App ID, the full API requests (at least the Account ID, and the response header the transaction ID?

Also, since the async performance hasn’t been fully resolved, this may be expected. Please reduce the complexity of the data being requested (fewer entity IDs, shorter time windows) to see if this helps.

  • App ID: 7123224
  • Account ID for the following failed request is: 18ce53y8owb
  • The full API request:
    We’re querying the following URL, with the data mentioned in the job response from my earlier comment. You can pass them with this URL.:
    https://ads-api.twitter.com/8/stats/jobs/accounts/18ce53y8owb/?<PARAMS FROM JOB DETAIL>
  • the response header the transaction ID: We can provide this if the above does not help.

What we have done:

  • Reduced the number of entities we query to 5 in a job
  • Upgraded the API version to 8.

This had no impact on improving the situation.

I am unable to see any jobs for that account. Could you provide the full API request used to create a job and/or transaction ID for the request to create the job? Can you confirm that the same request fails to complete or does this happen sporatically?

Hi, my name is Nati and I’m a developer at Singular.

We opened another internal thread with our customer and their Twitter POC(Jason Najera), so to be aligned with both conversations, I will go ahead and share their job details.

The following is an example of a call we’ve set today to pull yesterday’s data for ad_account_id: 18ce54tq4xb for PROMOTED_TWEETS

The full API call:
https://ads-api.twitter.com/8/stats/jobs/accounts/18ce54tq4xb/?placement=ALL_ON_TWITTER&metric_groups=ENGAGEMENT,BILLING,MOBILE_CONVERSION,VIDEO&start_time=2021-01-09T00:00:00-0800&entity=PROMOTED_TWEET&with_deleted=true&end_time=2021-01-10T00:00:00-0800&granularity=DAY&entity_ids=54v64a,54v64c,54v64b,54v64e,54v64d&segmentation_type=PLATFORMS

The failures are sporadic and happen for some of our customers.
The failures started when the last rate limit issues have started.
However, as mentioned before, the failures didn’t always raise after rate limit errors.


Sharing here two other cases that occurred to other customers and seem related:

Another call that failed today, for a different customer, with ad_account_id: 18ce53x0yy2
https://ads-api.twitter.com/8/stats/jobs/accounts/18ce53x0yy2/?placement=PUBLISHER_NETWORK&metric_groups=ENGAGEMENT,BILLING,MOBILE_CONVERSION,VIDEO&start_time=2021-01-09T00:00:00-0800&entity=PROMOTED_TWEET&with_deleted=true&end_time=2021-01-10T00:00:00-0800&granularity=DAY&entity_ids=12g3vc,12g3vb,13a83a,13a83b,13a83c&segmentation_type=PLATFORMS

Please see the response header:
{'x-api-version': '8.0', 'content-length': '402', 'x-rate-limit-reset': '1610251336', 'x-rate-limit-remaining': '49821', 'x-xss-protection': '0', 'x-concurrent-job-limit': '100', 'x-content-type-options': 'nosniff', 'x-connection-hash': '3c2a6ac8aea137126e280c40632a6a2de535d2b9e5811b5e0bbd28297ba2bba8', 'x-account-rate-limit-reset': '1610250703', 'x-runtime': '0.019029', 'cache-control': 'no-cache, no-store, max-age=0', 'content-disposition': 'attachment; filename=json.json', 'x-access-level': 'read-write', 'x-current-api-version': '8.0', 'date': 'Sun, 10 Jan 2021 03:48:38 GMT', 'x-rate-limit-limit': '50000', 'x-account-rate-limit-remaining': '369', 'x-account-rate-limit-limit': '2000', 'x-transaction': '3b85efdf7aba0edf', 'content-encoding': 'gzip', 'strict-transport-security': 'max-age=631138519', 'server': 'tsa_devel', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json;charset=utf-8', 'x-concurrent-job-limit-remaining': '99'}


For another customer(ad_account_id: 4wjgic), we did experience rate limit, which was handled with your best practices instructions - calculating the waiting time with ‘x-rate-limit-reset’, wait it +more 20 sec that we added ones this issue started. However, it seems like the ‘x-rate-limit-remaining’ header didn’t show zero for this case.

Could you please look into the mentioned cases and share with us the best practices to handle them? Especially the issue of the jobs with status: FAILED since this case is not mentioned in the API docs.

Thanks, we’re looking forward to hearing from you,
Nati-An

We’re investigating reports of increased Failed jobs and will let you know if we need additional information. There are multiple reasons that a job can Fail and we recommend implementing retry logic to expect these - ideally with an exponential backoff.

Thanks for the report on issues with x-rate-limit-remaining. We’ll have the engineering team take a closer look. However, to save on rate limits, we strongly recommend utilizing the Active Entities API endpoint to reduce the number of analytics requests - this allows only requesting entities/time windows where there is data and should substantially improve performance.

I took a look at the account above and noticed many API queries for timeframes without any active campaigns/entities. Your application may be able to substantially reduce the number of queries to fetch data and avoid rate limits.