Error: invalid_grant

75 views
Skip to first unread message

Lukáš Vožda

unread,
Aug 31, 2015, 2:48:38 PM8/31/15
to AdWords API Forum
Hi,

I am struggling to connect to AdWords API, i followed this instruction: https://developers.google.com/adwords/api/docs/first-request?hl=en

I configured my googleads.yaml file with my developer token and o2auth client_id and client_secret.

I am trying to execute basically only this two lines:

from googleads.adwords import AdWordsClient

client = AdWordsClient.LoadFromStorage()

I am using python 3.4

And still getting this error: 

Traceback (most recent call last):

  File "./adwords.py", line 6, 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


I tried to google a solution but nothing helped me. Please if you find the problem, I'll be very grateful

Thank you.
Reply all
Reply to author
Forward
0 new messages