Adwords API Issue

74 views
Skip to first unread message

jnmj...@gmail.com

unread,
Jun 14, 2018, 11:57:40 AM6/14/18
to AdWords API and Google Ads API Forum

Hi,

We are using adwords API and it's working since 6th june, but after 6th june api not working and it's show's below error.

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

So, Please tell me where is problem.

Teja Makani

unread,
Jun 14, 2018, 2:23:57 PM6/14/18
to AdWords API and Google Ads API Forum
Hello Jnm,

The "invalid_grant" error usually indicates that the access or refresh token being passed in your request is incorrect or invalid. 


To verify that your credentials are correct, you could try the CURL request provided below and see if you are able to generate the access token. If your credentials are correct, you should be able to generate an access token for the below CURL request.

curl https://www.googleapis.com/oauth2/v4/token \
-d refresh_token=your-refresh_token \
-d client_id=your-client-id \
-d client_secret=your-client-secret \
-d grant_type=refresh_token

If your credentials are incorrect or still facing issue then you could try generating a new refresh token with the help of this guide and retry your request. Please let me know if the issue persists.

Regards,
Sai Teja, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages