Probelem with AdWords API

695 views
Skip to first unread message

rat1g15.s...@gmail.com

unread,
Apr 30, 2018, 9:32:27 AM4/30/18
to AdWords API and Google Ads API Forum
Hello,

I am trying to access the AdWords API from a test acount after creating a production account to get the developer token. However, running the get_campaign.py throws the following error:

google.auth.exceptions.RefreshError: ('unauthorized_client: Unauthorized', '{\n  "error" : "unauthorized_client",\n  "error_description" : "Unauthorized"\n}')

The client_id, client_secret and refresh_token were created for the test account, and I am sure they are populated correctly in googleads.yaml

Thank you very much

Teja Makani

unread,
Apr 30, 2018, 5:46:41 PM4/30/18
to AdWords API and Google Ads API Forum
Hello,

The unauthorized_client error usually occurs when you are using incorrect OAuth credentials. Could you also try the CURL request provided below and see if you are able to generate the access tokens? That will help you confirm the validity of your OAuth2 credentials.

    -d refresh_token=MCC_refresh_token  \
    -d client_id=your-client-id  \
    -d client_secret=your-client-secret  \
    -d grant_type=refresh_token

If OAuth credentials are not generated correctly, you could generate them by following this guide. Please give this a try and let me know if you are able to fix the issue.
  
Regards,
Sai Teja, AdWords API Team.

Tejanth Atyam

unread,
Aug 22, 2023, 3:06:58 PM8/22/23
to Google Ads API and AdWords API Forum

Hello, are you able to solve the error.could you pls let me know?

Google Ads API Forum Advisor

unread,
Aug 23, 2023, 3:56:47 PM8/23/23
to tejant...@thecollective.energy, adwor...@googlegroups.com

Hi,

Thank you for reaching out to Google Ads API Forum.

It appears that this concern has been raised already in a thread with the subject: “Unable to connect to google ads account using oauth credentials”. Please note that our team already responded on that thread. With this, I suggest continuing the discussion there for better tracking of issues.

This message is in relation to case "ref:_00D1U1174p._5004Q2o7LjZ:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages