Google Ads API Refresh Token Issue

259 views
Skip to first unread message

Venkata Girish P

unread,
May 6, 2020, 1:39:38 PM5/6/20
to AdWords API and Google Ads API Forum
Hi All,

I'm trying to use Python version and in the config yaml file, I entered - developer token, client id, client secret & refresh token, but while trying to execute the below code I'm getting the error message attached for your reference.

PFB error message:

RefreshError: ('unauthorized_client: Unauthorized', '{\n  "error": "unauthorized_client",\n  "error_description": "Unauthorized"\n}')

What is going wrong? Should I authorize the project by verifying the ownership through Google Tag Managar / other methods? Is that the reason or is there any other reason?

Please let me know if you have any questions

Regards,
Girish.
Screenshot 2020-05-06 at 11.02.46 PM.png

Google Ads API Forum Advisor Prod

unread,
May 6, 2020, 4:54:29 PM5/6/20
to venkata...@simplilearn.net, adwor...@googlegroups.com
Hi Venkata,

Thank you for reaching out. That error usually occurs when there's an issue with your OAuth credentials. Please make sure you have generated them with an email address that has access to your account. I would recommend re-generating your OAuth credentials as explained in this guide and seeing if that solves the issue.

If you are still receiving that error, please share the email address you used to generate the credentials as well as your yaml file via Reply privately to author so that I can further investigate the issue.

Regards,
Mitchell
Google Ads API Team

ref:_00D1U1174p._5004Q1zKVtz:ref

Venkata Girish P

unread,
May 9, 2020, 5:23:22 AM5/9/20
to Google Ads API Forum Advisor Prod, adwor...@googlegroups.com
Hello Mitchell,

thanks for the response. I am trying to access Google Ads API Beta and not Adwords API. I would like to access the 'Recommendations' data particularly.  Please help me get started. 
  • Do I need to generate refresh tokens even for this Google Ads API? 
  • Account: venkata...@simplilearn.net
  • Project Name: Google-Ads-Python-V1
  • Created Credentials (Client id & Client secret)
and then stuck here. I request you to help me in setting up the environment as quickly as possible and please let me know in case if you need more information.

Regards,
Girish.
--
Regards,

Girish PV,
Group Manager - Marketing

Simplilearn
Train to win the digital economy


FacebookLinkedinTwitterYouTube

"Information contained and transmitted by this e-mail is confidential and proprietary to Simplilearn and is intended for use only by the addressee. If you are not the addressee, you are notified that any dissemination or copying of this e-mail is strictly prohibited and you are requested to delete this e-mail immediately and notify the originator. Simplilearn does not enter into any binding agreement with any party by e-mail. Any views expressed by an individual do not necessarily reflect the view of Simplilearn. Simplilearn is not responsible for the consequences of any actions taken based on information provided. While this e-mail has been checked for all known viruses the addressee should also scan for viruses."

Google Ads API Forum Advisor Prod

unread,
May 11, 2020, 10:33:16 AM5/11/20
to venkata...@simplilearn.net, adwor...@googlegroups.com
Hi Venkata,

Yes, you have to generate the refresh token for Google Ads API as well. You can follow the instructions here for setting up the Python client library. Specifically, the section "Setting up the client library" goes over how to get your refresh token. If you are still having issues, please feel free to share the email address you used to generate the credentials as well as your yaml file via Reply privately to author so that I can further investigate the issue.
Reply all
Reply to author
Forward
0 new messages