1

I am using Youtube API v3 for displaying some of the videos and channels feed in my application. I use GoogleWebAuthorizationBroker class to login into YouTube application using any Google account. This will give an access token after I enter proper username and password. Can anyone tell me how to logout current user? or revoke current access token? by using this api.

I have used this Nuget Package.

1 Answers1

1

I don't know if it's implemented in that library but you can call an url to revoke access token:

https://accounts.google.com/o/oauth2/revoke?token={token}

More info HERE

From this SO Question

Community
  • 1
  • 1
Joan Caron
  • 1,969
  • 18
  • 21
  • Hi Joan, thanks for reply. Can I check whether the current token is expired or not? If expired then I can refresh it. Please provide any reference link or code if you have. –  Apr 28 '14 at 13:49
  • `GoogleWebAuthorizationBroker.AuthorizeAsync` method returns UserCredential object. usercredentialObject.Token has all the values you need (ExpiresInSeconds, IsExpired(),RefreshToken, etc..) – Joan Caron Apr 28 '14 at 15:11