Failed to retrieve auth metadata with error: unauthorized_client

264 views
Skip to first unread message

Soni Suciadi

unread,
Nov 23, 2022, 8:35:53 AM11/23/22
to Google Ads API and AdWords API Forum
i am trying to access the campaign list that i have created, using the library (npm google-ads-api), i am getting a refresh token from the OAuth 2.0 playground but i am getting an error response like this
{
 code: 16,
  details: 'Failed to retrieve auth metadata with error: unauthorized_client',
  metadata: Metadata { internalRepr: Map(0) {}, options: {} },
  note: 'Exception occurred in retry method that was not classified as transient'
}
Jepretan Layar 2022-11-23 pukul 20.35.34.png

Google Ads API Forum Advisor

unread,
Nov 23, 2022, 11:25:16 AM11/23/22
to sonys...@gmail.com, adwor...@googlegroups.com

Hi Soni,


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

The "invalid_grant ” error usually indicates an issue with the refresh token. That said, you will need to regenerate credentials and refresh tokens. You may refer here to this guide for the steps on how you can regenerate credentials and refresh tokens.
 

If the issue still persists after the provided suggestion, you may note that the logs you have provided were not complete, with this, you may provide to us the complete API logs (request and response logs with request ID) generated on your end which include the invalid_grant error.

You can provide it via Reply privately to the author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.


Regards,

Google Logo
Darwin
Google Ads API Team
 


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