The following error occurs when trying to access the summary data.
from twython import Twython import json APP_KEY = '' APP_SECRET = '' OAUTH_TOKEN = '' OAUTH_TOKEN_SECRET = '' twitter = Twython(APP_KEY, APP_SECRET,OAUTH_TOKEN, OAUTH_TOKEN_SECRET) account_id = ‘' twitter.request('https://ads-api.twitter.com/1/stats/accounts/{}/reach/campaigns?campaign_ids={}&start_time=2014-01-01T07:00:00Z&end_time=2014-11-16T07:00:00Z’.format(account_id,’’))
Error: TwythonAuthError: Twitter API returned a 401 (Unauthorized), This request is not properly authenticated
Hello!
In order to make sure this is not an issue with the code. Can you try to make the same request using twurl (https://github.com/twitter/twurl)? If you receive an error please paste the API call and response.
Thanks!
Is there any other other package other than twurl to access the follwing request? https://ads-api.twitter.com/1/stats/accounts/{}/reach/campaigns?campaign_ids={}&start_time=2014-01-01T07:00:00Z&end_time=2014-11-16T07:00:00Z’.format(account_id,’*’)
@ajayanilkumar1: It doesn’t look like the other SDKs support this endpoint. What’s the hesitation with using twurl?
api to get linkclicks and page impression for particular page(twitter ads)?