Getting 401 Unauthorized error while oauth request

8,171 views
Skip to first unread message

Vijaysinh Parmar

unread,
Aug 19, 2021, 5:43:29 AM8/19/21
to AdWords API and Google Ads API Forum
Hi,

I am using test developer token for using google ads api php lib.

to get refreshtoken I am making oauth request using my test adwords account but I am getting below error,

Client error: `POST https://oauth2.googleapis.com/token` resulted in a `401 Unauthorized` response: { "error": "invalid_client", "error_description": "Unauthorized" }  and I am not getting refreshtoken.

what could be reason for this? my email id is already added as test user in api console project.

Thanks.

Google Ads API Forum Advisor

unread,
Aug 19, 2021, 1:25:36 PM8/19/21
to er.parm...@gmail.com, adwor...@googlegroups.com
Hi,

Please double check if the credentials (i.e. client ID and client secret) are correct and there are no blank spaces.

Thanks,
Google Logo
Lakshmi Prathipati
Google Ads API Team
 


ref:_00D1U1174p._5004Q2LoWee:ref

Brahim haddad

unread,
Jan 4, 2023, 10:49:57 AM1/4/23
to Google Ads API and AdWords API Forum
how i can check my credentials

Google Ads API Forum Advisor

unread,
Jan 4, 2023, 1:38:25 PM1/4/23
to brahimha...@gmail.com, adwor...@googlegroups.com

Hi Brahim,
 

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

With regards to your concern about this, "how i can check my credentials" you may refer to this guide. This guide contains information on how to get and check your credentials. I hope this helps.
 

Regards,

Google Logo
Darwin
Google Ads API Team
 



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