Hi
,
I’ve previously automated a pull of the default Daily Tweet Ad Performance .csv report via a three-step process:
- Generate the .csv report using the following URL:
“https://ads.twitter.com/accounts/[ACCT ID]/segments/export_data.json?endString=2017-03-14T00%3A00%3A00.000&startString=2017-03-11T00%3A00%3A00.000&segment=tweets&summary_metric=impressions&log_ec=false&show_bulk_export_button=true&cursor=&format=csv&granularity=day”
-
Poll the above URL’s JSON response until it returns a status = ‘Available’
-
Download the report at the following URL:
https://ads.twitter.com/accounts/[ACCT ID]/segments/bundle?endString=2017-03-14T00%3A00%3A00.000&startString=2017-03-11T00%3A00%3A00.000&segment=tweets&summary_metric=impressions&log_ec=false&show_bulk_export_button=true&cursor=&format=csv&granularity=day
Recently (as of 3/7/17), when my program attempts to .get() the report URL (via node-oauth), instead of receiving the expected JSON response, it instead fails and returns a 404 with the message “{ message: ‘Sorry, that page does not exist’, code: 34 }”.
Oddly, I am still able to manually log in, go to the URL, receive the expected response, and download the report with the above steps. So it seems the actual report generation functionality is still working (at least when run manually).
However, when attempting to query the same URL using the node-oauth library, passing in a valid accessToken / accessTokenSecret (which has worked previously), I am unable to successfully query the URL.
(I’ve regenerated my consumer & access tokens, and have tested the credentials by making calls to other API endpoint successfully – so I do not believe they are the culprit for these failures – but it’s not impossible).
I know that the new ‘ad manager’ was rolled out to my account recently, and I am wondering if that roll-out coincided with a locking down of this report generation endpoint? Has something changed with the way ads.twitter.com handles report generation? Is that something that could be reverted?
If not, is there a new/similar solution out there? Leveraging the Ads API is an option, but being able to pull that consolidated .csv file easily without having to manage and consolidate a hundred different API calls to recreate the report is more ideal.
Thanks,
B