Hello,
The following code is use to work with the adwords_client:
########################
import googleads
client_id = ' '
client_secret = ' '
refresh_token = ' '
company = ' '
client_customer_id = ' '
# or with:
# oauth2._TOKEN_URL = 'https://accounts.google.com/o/oauth2/token'
# oauth2._GOOGLE_OAUTH2_ENDPOINT =
'https://accounts.google.com/o/oauth2/auth'
oauth2_client = oauth2.GoogleRefreshTokenClient(client_id, client_secret,
refresh_token)
adwords_client = adwords.AdWordsClient(None, oauth2_client, company,
client_customer_id=client_customer_id)
report_downloader = adwords_client.GetReportDownloader(version='v201710')
########################
The googleads's oauth2_client is doing a token refresh as necessary and the
first request is the refresh that has the response code of invalid_grant.
What can be the reasons for the 'invalid_grant' error response ?
client_id, client_secret and refresh_token should be the correct ones, as
give by client_secret_***.apps.googleusercontent.com.json
Thanks,
Kashirin Alex
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords 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 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/cf0c97f4-3d79-46cf-a2f0-5d53f65483d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.