unauthorized error

64 views
Skip to first unread message

LiftFund US

unread,
Mar 9, 2023, 3:00:16 PM3/9/23
to Google Ads API and AdWords API Forum
Hello, 

I generated a new refresh token successfully through the oAuth playground, but I am getting an unauthorized error whenever I try to run a script such as get_campaigns.py

Let me know if you are able to help, thanks! 

Google Ads API Forum Advisor

unread,
Mar 10, 2023, 1:49:05 AM3/10/23
to liftfu...@gmail.com, adwor...@googlegroups.com
Hi,

Thanks for reaching out to the Google Ads API Team. We hope you are doing well today.

To take a closer look to your unauthorized error, could you please provide us the complete API logs (request and response logs with requestID) that are generated on your end where we can see the error as well. I ask this so that we can investigate further on what is causing the said error.

If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Python) > Logging documentation, which you can access from this link

Moving forward, the kinds of Authorization Error is listed in this document

Best regards,
Google Logo Google Ads API Team


ref:_00D1U1174p._5004Q2jXts0:ref

LiftFund US

unread,
Mar 10, 2023, 11:51:58 AM3/10/23
to Google Ads API and AdWords API Forum
Thank you for your quick response! Attached is a file with the logs. Let me know if you need further information from me.
example.log

Google Ads API Forum Advisor

unread,
Mar 13, 2023, 2:09:04 AM3/13/23
to liftfu...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for providing more details. I can see that you are encountering the "error": "unauthorized_client", "error_description": "Unauthorized". To help you with this issue, could  you try to confirm on your end if the implementation of the API environment is correct, especially the authentication part based on the documents below?
Also, you may refer to this guide to configure a Google Ads API console project for the Google Ads API. Let me know what goes after.
Reply all
Reply to author
Forward
0 new messages