Hi everyone.
I have been trying to build a Twitter Ads API solution using the python SDK but I am unable to load the advertiser account instance. This is the basic code.
from twitter_ads.client import Client
from twitter_ads.campaign import Campaign
from twitter_ads.enum import ENTITY_STATUS
CONSUMER_KEY = 'xxx'
CONSUMER_SECRET = 'xxx'
ACCESS_TOKEN = 'xxx'
ACCESS_TOKEN_SECRET = 'xxx'
ACCOUNT_ID = 'xxx'
client = Client(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
account = client.accounts(ACCOUNT_ID)
It works fine till the client is initialised.
But I get this error while initialising the account:
<NotAuthorized object at 0x103dd1730 code=401 details=[{u'message': u'This request is not properly authenticated', u'code': u'UNAUTHORIZED_ACCESS'}]>
Has my access to Twitter Ads API been revoked or is this some other issue? Any help is appreciated.
Thank you!