New app access token every 24 hours

I’ve built a server app to communicate with the twitch i.e. to request the app access token. My server app is hosted on Heroku. Heroku once in 24h randomly restarts the apps, so the cached app access token is lost. Storing a single app access token in the database would be overkill.

My question is: Would there be a problem if I request a new app access token every 24 hours? Is there a limit?


Technically yes, but it doesn’t apply if you lose and never reuse the token you lost.

Every ~25 tokens generated when you generate the next token the 1st one is destroyed, so if you have hung on to and are using that First one then you get errors.

Me I generate a token, store it, check it’s valid every 15 minutes and regenerate if I need to, but of course you can’t store your token…

TLDR: Yes thats fine

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.