Google Ads Facing issue

47 views
Skip to first unread message

Rinki Kumari

unread,
Oct 11, 2021, 9:48:21 AM10/11/21
to AdWords API and Google Ads API Forum
Hi Team,

I am facing issue when run GetCampaigns.php. Please help to resolve it.
ASAP.

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": "Bad Request" } in /var/www/html/google-ads-php1/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace: #0 /var/www/html/google-ads-php1/vendor/guzzlehttp/guzzle/src/Middleware.php(69): GuzzleHttp\Exception\RequestException::create() #1 /var/www/html/google-ads-php1/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp\{closure}() #2 /var/www/html/google-ads-php1/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler() #3 /var/www/html/google-ads-php1/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() #4 /var/www/html/google-ads-php1/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Promise\TaskQueue->run() #5 /var/www/html/google-ads-php1/vendor/guzzlehttp/promi in /var/www/html/google-ads-php1/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113

sssssssssss.png

Thanks
Rinki

Google Ads API Forum Advisor

unread,
Oct 11, 2021, 11:31:19 PM10/11/21
to rinki....@subcodevs.com, adwor...@googlegroups.com
Hi Rinki,

Thank you for reaching out to our API support team. 

An invalid_grant error usually indicates an issue with your refresh token. That said, I would recommend that you regenerate the said refresh token. Since you are using PHP, you can refer to this guide on how to setup your authentication credentials.

Let me know how this goes, and should the issue persist, you may enable logging by referring to this PHP guide, and provide to our team the complete request and response logs, with the request-id.

You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


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