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?

  • 3
    Duplicate of those two: stackapps.com/questions/2831/…, stackapps.com/questions/3611/… (in short: not possible) Commented Dec 15, 2015 at 9:50
  • @ShadowWizard God damn!! It's not possible then why should they provide this API ?
    – M D
    Commented Dec 15, 2015 at 10:08
  • Don't ask me... Kevin (who answered both questions) is SE developer working on the API, you can ask him (politely please) in a comment. Commented Dec 15, 2015 at 10:19
  • @MD that 'God damn' comment was priceless. hahahaha. I think it's a normal reaction xD Commented Jan 31, 2018 at 9:21

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. :) Commented 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
    Commented 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 .