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”.
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”
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.