Hi, 

I confronted this problem and do not know how to fix it. I do not need to 
update the token if I have configure the refresh token, right?

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."
}

The code:

// Generate a refreshable OAuth2 credential for authentication.
$oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build();

// Construct an API session configured from a properties file and the
// OAuth2 credentials above.
$session = (new AdWordsSessionBuilder())->fromFile()->withOAuth2Credential(
$oAuth2Credential)->build();
self::runExample(new AdWordsServices(), $session, self::AD_GROUP_ID);

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/f80cf848-8e6f-4585-a4dd-4a43420e6f7d%40googlegroups.com.

Reply via email to