getting fatal error using google adword api Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:

28 views
Skip to first unread message

Amit Agarhari

unread,
Oct 30, 2019, 3:00:24 PM10/30/19
to AdWords API and Google Ads API Forum
PHP Fatal error:  Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:
{
  "error": "invalid_grant",
  "error_description": "Bad Request"
}
' in /opt/msa/lib/php/api/googleads/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113

Google Ads API Forum Advisor Prod

unread,
Oct 30, 2019, 4:12:05 PM10/30/19
to amit.a...@admedia.com, adwor...@googlegroups.com
Hi Amit, 

The invalid_grant error is usually seen due to an expired refreshToken. To resolve this issue, you may try to regenerate the refreshToken and the OAuth2 credentials using an email address which currently has access to your Google Ads account and then retry the request again. 
 
If you're seeing this issue, could you provide the email address you used when you generated your credentials along with the CID of the account, so I can investigate further? You may share the details privately via Reply privately to author option.

Thanks,
Bharani, Google Ads API Team

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