Serious? chat:read tokens expire after ~4 hours?

im developing a chat interactive game and i just saw, that the generated chat tokens expire about 4 hours after creation.

if im right, and it seems so, than thats absolutely insane, senseless and a serious problem in my opinion.

"access_token" => "XXX"
    "expires_in" => 14837
    "refresh_token" => "XXX"
    "scope" => array:1 [▼
      0 => "chat:read"
    "token_type" => "bearer"

i understand it could be somekind of “security” or whatever to expire chat:edit tokens that fast, but read tokens? everybody can read chat without limits, even guests on the twitch website…

how i suppose to create a working product if the tokens expire that quick?

i know i could refresh them, but i also know how limited or how much serious issues you cause when you call the twitch api to much…

imagine i have 10k streamers and i have to refresh all their tokens every 4 hours.
and no, doing a own bot that join all these channels is also no option, i tried this in the past, its horrible much work and cause too much issues…

is there any solution around this quick expiration for chat:read tokens?

because if not, i have to remove the twitch chat interaction implementation completely and go for a own third party “client”.

best wishes


You only need to refresh when you connect.

You can connect, and remain connected forever.

Your key will expire but your connection will still be fine.

If you only need to read and not send, Connect to chat anonomously

Use username: justinfanxxx
Where xxx is a random number
And a blank/empty password

hello Mr. Barry Carlyon,

thanks for the quick response.

You know that it is not very unusual, to loose connection for some reason to TMI ?



guest login? never heared off it. is this permanently working or just a “forgotten” functionality that maybe get wiped out in the near future?

Disconnections are rare in my expierence

How do you think people not logged into Twitch can read chat? It’s not going anywhere any time soon

good point, did not think about this might be “legal”, some workarounds could cause troubles time by time… in this case, as it is never documented or presented (as i know) as usable solution for custom chat clients… i did not thought really about it…

anyway well, thanks!,

that “fixes” my problem at least for the time “anywhere any time soon”



A lot of us use it all the time.

The docs cover read/write since there’s not that many things that people work with that do just reading

As Barry said you only need a valid token on connection, but if you’re hosting your bot on an unstable server that doesn’t have a reliable connection you can just automate the process at regular intervals.

If you stagger the refreshing of tokens you can spread them out to the degree where you never have a burst of renewals and the overhead is insignificant. 10,000 API requests spread over a 4 hour period is a negligible amount of requests so if you want to maintain token validity 100% of the time rather than waiting until connection to test validity and refresh if needed that’s entirely possible.

Thank you for you answer Dist,

its well…

the guest method by “BarryCarlyon” sounds perfect for me. I already implemented it and it works flawless.

the game client now by itself can read the players chat and respond to actions, and even on disconnect the client can just reconnect anytime…

easy and working, no need anymore for refreshing or external bots…

so its perfect.



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