Ads Campaign Api

twitterads

#1

hey,
I followed following steps:

  1. I used " https://ads-api.twitter.com/4/stats/jobs/accounts/accountId?entity=CAMPAIGN&entity_ids=entityId&start_time=2018-11-01&end_time=2018-12-01&granularity=TOTAL&placement=ALL_ON_TWITTER&metric_groups=ENGAGEMENT " api to get report Id.
  2. then. I used “https://ads-api.twitter.com/4/stats/jobs/accounts/acountId?job_ids=reportId”, to get the report url, but still this api response is giving me “url” as null status as null.

When doing this through postman it works fine , but when using it through node JS, step 2 api endpoint is giving me response url:“null” and “status”:“processing”.

Can anyone help me with this?
Thanks in advance.!


#2

@snigdhaJogdand

This simply means you have to “wait” until the job has completed. As this endpoint is “Asynchronous”, you need to consider having some sleep&retry logic. Then eventually, you will get an actual URL and "status": "SUCCESS" as described here.

Best,
Shohei