2

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?

1 Answer 1

2

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.

1
  • Thanks!. I tested with the current tokens and validated it with some tokens from browser history. Commented Nov 5, 2018 at 18:58

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.