I have recently developed my own Stack Overflow Android App, by using Stack Exchange API.

I am logging into Stack Overflow by using Authentication OAuth 2.0 implicit with Google. I got access_token and Api key from StackApps, and I can successfully read all the data. It's fine now, but I want to implement logout functionality.

How to logout from Google here using the API? Do I need to invalidate my access_token in this situation?

Please give me some hint how to do this?


2 Answers 2


A better way is to invalidate the token


I did after 4 hours.

It's not official way but right now i have no other way (Patch). I just clear all Cookies.

public void clearCookies(){
    CookieManager cookieManager = CookieManager.getInstance();
  • Well, it's not really related to the API then, but if it works. it works. :) Dec 15, 2015 at 12:04
  • @ShadowWizard May be you're right but still i can't find a way to logout. but it worked right now.it worked.
    – M D
    Dec 15, 2015 at 12:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .