I have tried configuring the yaml file and getting the constructor by
loading from storage while also the method below.
But I keep getting the following error. Can some one please help?
[2018-09-27 17:02:52,326 - googleads.soap - WARNING] Error summary:
{'faultMessage': "[AuthenticationError.OAUTH_TOKEN_INVALID @ ;
trigger:'<null>']", 'requestId': '000576e32d3d31000aa37e521e0075d1',
'serviceName': 'CustomerService', 'methodName': 'getCustomers', 'operations':
'0', 'responseTime': '20'}
....
GoogleAdsServerFault: [AuthenticationError.OAUTH_TOKEN_INVALID @ ;
trigger:'<null>']
GOOGLE_OAUTH2_ENDPOINT = 'https://accounts.google.com/o/oauth2/token'
# OAuth2 credential information.
DEFAULT_CLIENT_ID = 'INSERT_CLIENT_ID_HERE'
DEFAULT_CLIENT_SECRET = 'INSERT_CLIENT_SECRET_HERE'
DEFAULT_REFRESH_TOKEN = 'INSERT_REFRESH_TOKEN_HERE'
# AdWords API information.
DEFAULT_CLIENT_CUSTOMER_ID = 'INSERT_CLIENT_CUSTOMER_ID_HERE'
DEFAULT_DEVELOPER_TOKEN = 'INSERT_DEVELOPER_TOKEN_HERE'
USER_AGENT = 'INSERT_USER_AGENT_HERE'
oauth2credentials = client.OAuth2Credentials(
None, DEFAULT_CLIENT_ID, DEFAULT_CLIENT_SECRET, DEFAULT_REFRESH_TOKEN,
datetime.datetime(1980, 1, 1, 12), GOOGLE_OAUTH2_ENDPOINT,
USER_AGENT)
oauth2credentials.refresh(httplib2.Http())
oauth2_client =
oauth2.GoogleAccessTokenClient(oauth2credentials.access_token,
oauth2credentials.token_expiry)
adwords_client = adwords.AdWordsClient(
DEFAULT_DEVELOPER_TOKEN, oauth2_client, USER_AGENT,
client_customer_id=DEFAULT_CLIENT_CUSTOMER_ID)
customer = adwords_client.GetService('CustomerService').getCustomers()[0]
print(f"You are logged in as {customer['customerId']}")
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/1429dc96-3b02-47b8-ad8b-c80ee3008860%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.