Same issue here too, but had to modify Aine's method a bit to get it to
work:
Add library to composer:
"google/apiclient": "^2.0"
Code:
$client = new \Google_Client();
$client->setAuthConfig('PATH_TO_JSON_FILE')); // JSON file in
Google dev console under credentials
$client->fetchAccessTokenWithRefreshToken($refreshToken); //
$revoke = $client->revokeToken(); // returns true if it worked
On Tuesday, May 31, 2016 at 8:21:48 AM UTC-7, Aine Hickey wrote:
>
> Thanks Tomas. I had the same issue, but the code is slightly different.
> You're answer set me in the right direction.
>
> For anyone else who has this problem, this is what I did.
>
> Add library to composer:
> "google/apiclient": "1.0.*@beta"
>
> Code:
> $client = new \Google_Client();
> $client->setApplicationName('xxx');
> $client->setDeveloperKey('xxx');
>
> $oauth2 = new \Google_Auth_OAuth2($client);
> $result = $oauth2->revokeToken('xxx'); // Access or refresh token
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/4e5b4f62-174c-4508-ab4e-604cb5d1afd6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.