Expired Tokens



I’m running a twitter application which manages followers on behalf of an user. So far everything works. The users authorizes my app to do everything it needs to do and the system runs smoothly. But after a while (sometimes 1 week, sometimes 2 or more) the user access tokens expire and I get the dreaded " [89 - Invalid or expired token]". I’m careful not to run into limits and I’m not spamming. At least I’m not getting any message from twitter in this regard, which should pop up in my or the users account.

Has someone any idea why the tokens get expired after a seemingly random timeframe?

I’d greatly appreciate any nudge in the right direction. Thanks.



@ascky Twitter users can revoke your application’s access at any time, could this be the case to explain the seemingly random timeframe?


I’ve taken this in account and made some test accounts and tried it with them. Same result. There’s no alert or notice regarding revocation from Twitter’s side.


Can you please provide some details around these test accounts?

It would be helpful for us to know the following:

  • Your app ID that you are experiencing this with
  • The user IDs of the individuals who’s tokens have expired
  • The timing of the addition of the test accounts to your app and the expiration of those tokens.