Hello, thank you for your reply. I tried do it again according to the guide you sent. Result is still the same :-(
I even tried even this <https://developers.google.com/adwords/api/docs/guides/oauth_playground#step_2_-_generate_tokens_using_the_oauth_20_playground> but there is not AdWords in the list of APIs to autorize and this <https://github.com/googleads/googleads-python-lib/blob/master/examples/adwords/authentication/create_adwords_client_without_yaml.py> but got the same invalid_grant error. I really dont know where is the problem, I will try to describe my process step by step: 1. I got the developer token approved in my MCC account 2. Then created project in Google Developers Console and added OAuth 2.0 client ID (application type - other), So i got client_id and client_secret 3. Then executed this <https://github.com/googleads/googleads-python-lib/blob/master/examples/adwords/authentication/generate_refresh_token.py>, put the link to the browser, again under my MCC account accepted and got the code into the terminal, which gave me my refresh token 4. After these steps i had all the information to fill googleads.yaml file, stored in my home directory, there are no spaces after token strings 5. I executed these two lines in python: from googleads.adwords import AdWordsClient client = AdWordsClient.LoadFromStorage() I tried many times and still getting invalid_grant error. If you find where is the problem, I would be very grateful. Thank you. Lukas On Tuesday, September 1, 2015 at 9:05:57 AM UTC+2, Thanet Knack Praneenararat (AdWords API Team) wrote: > > Hello, > > Can you try following this guide > <https://developers.google.com/adwords/api/docs/guides/authentication> > again? > Make sure you select a correct type of application type, log in as your > MCC account user when you do the step to get refresh token, and finally > leave no spaces after a refresh token in googleads.yaml > <https://github.com/googleads/googleads-python-lib/blob/master/googleads.yaml> > . > > Best, > Thanet, AdWords API Team > > On Tuesday, September 1, 2015 at 3:48:54 AM UTC+9, Lukáš Vožda wrote: >> >> Hello, >> >> ive got similar error. I regenerated refresh token many times, it didnt >> help, is there anything else i can do? >> >> I spent hours trying to work it out but still the same result.... >> >> This is my error: >> Traceback (most recent call last): >> File "./adwords.py", line 4, in <module> >> client = AdWordsClient.LoadFromStorage() >> File "/usr/local/lib/python3.4/site-packages/googleads/adwords.py", >> line 188, in LoadFromStorage >> cls._OPTIONAL_INIT_VALUES)) >> File "/usr/local/lib/python3.4/site-packages/googleads/adwords.py", >> line 223, in __init__ >> self.oauth2_client.Refresh() >> File "/usr/local/lib/python3.4/site-packages/googleads/oauth2.py", line >> 165, in Refresh >> self.disable_ssl_certificate_validation))) >> File "/usr/local/lib/python3.4/site-packages/oauth2client/client.py", >> line 597, in refresh >> self._refresh(http.request) >> File "/usr/local/lib/python3.4/site-packages/oauth2client/client.py", >> line 768, in _refresh >> self._do_refresh_request(http_request) >> File "/usr/local/lib/python3.4/site-packages/oauth2client/client.py", >> line 833, in _do_refresh_request >> raise AccessTokenRefreshError(error_msg) >> oauth2client.client.AccessTokenRefreshError: invalid_grant >> >> >> Thank you. >> Lukas. >> On Tuesday, July 7, 2015 at 11:45:57 PM UTC+2, Umesh Dengale wrote: >>> >>> Hello, >>> >>> Please regenerate refresh token >>> <https://github.com/googleads/googleads-python-lib/blob/master/examples/adwords/authentication/generate_refresh_token.py>, >>> update >>> the refresh_token property in the googleads >>> <https://github.com/googleads/googleads-python-lib/blob/master/googleads.yaml>.yaml >>> file >>> and execute any example from the library. >>> >>> Thanks, >>> Umesh, AdWords API Team. >>> >> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. 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/e252c747-0be7-43e2-83e4-db27933e6875%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.