Tuesday, 31 May 2016

Re: Revoke OAuth token using API

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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
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 adwords-api+unsubscribe@googlegroups.com.
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/4e5cd398-e99e-412b-8609-da0fcea53aef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment