Hi Everyone,
I've had this exact same problem and I solved it by including the path to
googleads.yaml as an argument to LoadFromStorage.
adwords.AdWordsClient.LoadFromStorage('PATH_TO_GOOGLEADS.YAML')
Thanks
On Tuesday, 7 July 2015 14:26:46 UTC+1, Aydoğan Karagöz wrote:
>
> Hello Everyone!
>
> I am very new with AdWords API and trying to execute very basic example
> <https://github.com/googleads/googleads-python-lib/blob/master/examples/adwords/v201502/basic_operations/get_campaigns.py>
>
> from the library.
>
> I just filled *developer_token*, *user_agent*, *client_id*,
> *client_secret* and *refresh_token* fields in googleads.yaml file and put
> it in my home directory.
>
> When I run that example script, I get the following error:
>
> Traceback (most recent call last):
>
> File "get_campaigns.py", line 81, in <module>
>
> main(adwords_client)
>
> File "get_campaigns.py", line 58, in main
>
> print campaign_service.get(selector)
>
> File "build/bdist.macosx-10.10-intel/egg/googleads/common.py", line 294,
> in MakeSoapRequest
>
> File "build/bdist.macosx-10.10-intel/egg/googleads/adwords.py", line
> 335, in SetHeaders
>
> File "build/bdist.macosx-10.10-intel/egg/googleads/oauth2.py", line 150,
> in CreateHttpHeader
>
> File "build/bdist.macosx-10.10-intel/egg/googleads/oauth2.py", line 166,
> in Refresh
>
> File
> "/Library/Python/2.7/site-packages/oauth2client-1.4.11-py2.7.egg/oauth2client/client.py",
>
> line 598, in refresh
>
> File
> "/Library/Python/2.7/site-packages/oauth2client-1.4.11-py2.7.egg/oauth2client/client.py",
>
> line 769, in _refresh
>
> File
> "/Library/Python/2.7/site-packages/oauth2client-1.4.11-py2.7.egg/oauth2client/client.py",
>
> line 834, in _do_refresh_request
>
> oauth2client.client.AccessTokenRefreshError: invalid_grant
>
>
> Any suggestion of your to fix that error is welcome.
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 http://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/c58fd23c-a79b-4059-9bda-a2df0b6f43cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.