While learning how to work with the StackApps APIs, I created quite a few (more than 10) access_token with no_expiry scope. Finally I have got my applicaiton working but I am worried that all those access_token are out open in the wild and on top of that I did not save them anywhere.
Should I be worried?. How do I access the tokens that I created and delete them?

up vote 2 down vote accepted

This is what the /apps/{accessTokens}/de-authenticate route does.

Passing valid access_tokens to this method causes the application that created them to be de-authorized by the user associated with each access_token. This will remove the application from their apps tab, and cause all other existing access_tokens to be destroyed.

(Emphasis added)

So if you do not remember a valid access_token, create a temporary new one for that user and your app.

Then call /2.2/apps/{A_VALID_TOKEN_FOR_USER}/de-authenticate.

This will invalidate all of that user's tokens for your app.

  • Thanks!. I tested with the current tokens and validated it with some tokens from browser history. – raj Nov 5 at 18:58
  • You're welcome; glad to help. – Brock Adams Nov 5 at 19:24

You must log in to answer this question.

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