Problem Connecting to the api

52 views
Skip to first unread message

Alexander Meis

unread,
Mar 21, 2018, 5:14:05 PM3/21/18
to AdWords API Forum
HI,
i run the googleads-php-lib, i set up the api credentiials like in the tutorial but on executing it got this error

2018/03/21 17:18:35 [error] 9367#0: *59204 FastCGI sent in stderr: "PHP message: 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"
}

can someone tell me how to fix this issue?

Thanks

Best regards,
Alex

Luis Xander Talag (AdWords API Team)

unread,
Mar 22, 2018, 12:01:58 AM3/22/18
to AdWords API Forum
Hi Alex,

The invalid_grant error normally occurs due to 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 AdWords account and then retry the request again. 

Should the issue persist, could you provide which email address you used when you generate your credentials and your clientCustomerId so I can investigate further? Please reply via Reply privately to author with your details.

Thanks and regards,
Luis
AdWords API Team
Reply all
Reply to author
Forward
0 new messages