Bad request error

1,589 views
Skip to first unread message

Cyber Media

unread,
Apr 21, 2021, 7:31:04 AM4/21/21
to AdWords API and Google Ads API Forum
Hi,

I'm trying to make a adword api for creating report..i have done all process as per the tutorial but facing below error

google.auth.exceptions.RefreshError: ('invalid_grant: Bad Request', '{\n  "error": "invalid_grant",\n  "error_description": "Bad Request"\n}')

I tried from different source and getting different error:
  File "C:/Users/Sangeet/Desktop/google_ads_tutorials-master/src/test_google_ads_access/download_keywords_from_account.py", line 5, in <module>
    from src import gads_client, config
  File "C:\Users\Sangeet\Desktop\google_ads_tutorials-master\src\__init__.py", line 26, in <module>
    from google.ads import GoogleAdsClient
ImportError: cannot import name 'GoogleAdsClient' from 'google.ads' (unknown location)

Kindly suggest me some appropriate source for resolving these error.



Google Ads API Forum Advisor Prod

unread,
Apr 21, 2021, 2:00:06 PM4/21/21
to cyberm...@gmail.com, adwor...@googlegroups.com

Hi Cyber Media,

Thank you for bringing this question to our attention. I was looking over our documentation here. I see that when looking at the invalid_grant issue this tends to point to your refresh tokens having been used up, as explained here.

What we would suggest is that you get a new OAuth token which should help to fix your refresh token. Here are the steps again to getting a new OAuth.

Regards,

Google Logo
William Pescherine
Google Ads API Team
 


ref:_00D1U1174p._5004Q2FaL10:ref
Reply all
Reply to author
Forward
0 new messages