Hi Josh,

That’s the problem if Google gives us a valid refresh token, unless it is 
expired/revoked when the user is brought through the re-authentication problem 
no additional refresh token is provided.  Thank you for confirming that the 
library currently does not revoke access.  The issue you linked to mentions a 
“beta” can you link to that or tell me more about that, so I can see if maybe 
we can use that instead with the Google Auth library?

Thanks,
James


> On May 11, 2016, at 2:55 PM, 'Josh Radcliff (AdWords API Team)' via AdWords 
> API Forum <adwords-api@googlegroups.com> wrote:
> 
> Hi James,
> 
> You are correct that the current Ads PHP library does not support revoking a 
> refresh token. We are in the process of rolling out a new and improved 
> library that uses the Google Auth PHP library -- please see the related issue 
> on github <https://github.com/googleads/googleads-php-lib/issues/115>.
> 
> For your use case, instead of revoking the refresh token when you find that 
> it does not provide access to the user's account, could you simply discard 
> the stored refresh token for that user, then redirect them through your OAuth 
> flow and store the newly acquired token?
> 
> Thanks,
> Josh, AdWords API Team
> 
> On Tuesday, May 10, 2016 at 8:48:17 PM UTC-4, James Andrews wrote:
> This is not for a web application, and $client->revokeToken() does not exist 
> in the php library for Adwords like it does for the standard Google API. 
> 
> These are the 2 classes that are used for handling Oauth2 for Adwords API
> 
> https://github.com/googleads/googleads-php-lib/blob/master/src/Google/Api/Ads/Common/Util/OAuth2Handler.php
>  
> <https://github.com/googleads/googleads-php-lib/blob/master/src/Google/Api/Ads/Common/Util/OAuth2Handler.php>
> 
> https://github.com/googleads/googleads-php-lib/blob/master/src/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php
>  
> <https://github.com/googleads/googleads-php-lib/blob/master/src/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php>
> 
> Neither of them have a revoke function in them.  What you are suggesting does 
> not work with what we are using, as I stated before I started out trying to 
> use refresh/access tokens from GoogleAPI Oauth, and it didn’t work I had to 
> use the Google Adwords API to initiate Oauth.
> 
> Please escalate this issue because apparently you don’t know the answer and 
> aren’t reading completely what I’ve said in the past 2 emails and I don’t 
> need to go back and forth over and over to get an answer for the Google 
> Adwords API.
> 
> James
> 
> 
>> On May 10, 2016, at 5:22 PM, 'Shwetha Vastrad (AdWords API Team)' via 
>> AdWords API Forum <adwords-api@googlegroups.com 
>> <mailto:adwords-api@googlegroups.com>> wrote:
>> 
>> Hi James,
>> 
>> If the OAuth2.0 credentials you have are for a Web application, then the 
>> refresh token can be revoked programmatically 
>> <https://developers.google.com/identity/protocols/OAuth2WebServer#offline> 
>> by calling "$client->revokeToken()". For installed applications, you could 
>> use below code to revoke the token using C# client library.
>> 
>> AdsOAuthProviderForApplications oAuth2Provider =  (user.OAuthProvider as 
>> AdsOAuthProviderForApplications);
>> oAuth2Provider.RevokeRefreshToken();
>> 
>> Unfortunately, a similar option is not available in the PHP library for 
>> installed applications.
>> 
>> Regards,
>> Shwetha, AdWords API Team.
>> 
>> -- 
>> -- 
>> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>> Also find us on our blog and Google+:
>> https://googleadsdeveloper.blogspot.com/ 
>> <https://googleadsdeveloper.blogspot.com/>
>> https://plus.google.com/+GoogleAdsDevelopers/posts 
>> <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 
>> <mailto:adwords-api@googlegroups.com>
>> To unsubscribe from this group, send email to
>> adwords-api+unsubscr...@googlegroups.com 
>> <mailto:adwords-api+unsubscr...@googlegroups.com>
>> For more options, visit this group at
>> http://groups.google.com/group/adwords-api?hl=en 
>> <http://groups.google.com/group/adwords-api?hl=en>
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "AdWords API Forum" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/adwords-api/4WNjPTkF7Cw/unsubscribe 
>> <https://groups.google.com/d/topic/adwords-api/4WNjPTkF7Cw/unsubscribe>.
>> To unsubscribe from this group and all its topics, send an email to 
>> adwords-api+unsubscr...@googlegroups.com 
>> <mailto:adwords-api+unsubscr...@googlegroups.com>.
>> Visit this group at https://groups.google.com/group/adwords-api 
>> <https://groups.google.com/group/adwords-api>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/adwords-api/04265b91-82b8-455d-9d96-b3709792321a%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/adwords-api/04265b91-82b8-455d-9d96-b3709792321a%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> -- 
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog and Google+:
> https://googleadsdeveloper.blogspot.com/ 
> <https://googleadsdeveloper.blogspot.com/>
> https://plus.google.com/+GoogleAdsDevelopers/posts 
> <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+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/adwords-api?hl=en 
> <http://groups.google.com/group/adwords-api?hl=en>
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "AdWords API Forum" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/adwords-api/4WNjPTkF7Cw/unsubscribe 
> <https://groups.google.com/d/topic/adwords-api/4WNjPTkF7Cw/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> adwords-api+unsubscr...@googlegroups.com 
> <mailto:adwords-api+unsubscr...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/adwords-api 
> <https://groups.google.com/group/adwords-api>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/adwords-api/373a6743-4c43-4f24-863d-23ccee03138b%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/adwords-api/373a6743-4c43-4f24-863d-23ccee03138b%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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+unsubscr...@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+unsubscr...@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/0317FC9C-9E6E-44E1-BAE1-2AC9353AB00A%40openbridge.com.
For more options, visit https://groups.google.com/d/optout.
  • Programmaticall... James Andrews
    • Re: Progra... 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum
      • Re: Pr... James Andrews
        • Re... 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum
          • ... James Andrews
            • ... 'Josh Radcliff (AdWords API Team)' via AdWords API Forum
              • ... James Andrews
                • ... 'Josh Radcliff (AdWords API Team)' via AdWords API Forum

Reply via email to