Long lived access token

Hello, is there any way to get long lived access token for chat bot?
When I get token through OAuth Authorization Code Flow it will expire in an hour, but when I get it by https://twitchapps.com/tmi/ it seems that it lives much longer.

Generally speaking a user access token will last for four hours. (A single hour is odd…)

For a chat bot, the token is only checked for validity when you connect to Twitch. When the key dies your bot is not DC’ed

So use the refresh token to automate collecting a obtaining a new token, when your bot boots/reconnects to chat.

You are right, it lives four hours, I got 3600 seconds from API documentation.
Thank you!


Expirations might change/update at any time, so the docs were probably an example. The validaity endpoint and/or the token response will always give the up to date information

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