Token has been expired or revoked

310 views
Skip to first unread message

Яков Осипенков

unread,
Feb 7, 2022, 8:16:56 AM2/7/22
to Google Ads API and AdWords API Forum
Hi. We are trying to get Google Ads account statistics by API, we got a basic developer token. When we try to send requests, we get the following error:

PHP Fatal error:  Uncaught GuzzleHttp\Exception\ClientException: Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:
{
  "error": "invalid_grant",
  "error_description": "Token has been expired or revoked."
}

Google technical support, which issued access and wrote to the mail, does not respond with return letters. Thanks!

Yakov Osipenkov

unread,
Feb 7, 2022, 8:30:10 AM2/7/22
to Google Ads API and AdWords API Forum
We installed the library according to this guide
https://github.com/googleads/google-ads-php

and then created a configuration like this
https://developers.google.com/google-ads/api/docs/client-libs/php/configuration

using code from library examples

понедельник, 7 февраля 2022 г. в 16:16:56 UTC+3, Yakov Osipenkov:

Google Ads API Forum Advisor

unread,
Feb 7, 2022, 4:58:43 PM2/7/22
to adpla...@gmail.com, adwor...@googlegroups.com
Hi Yakov,

Here is a list of refresh token expiration reasons, could you generate a new refresh token?

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


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