Method to obtain new/current oauth token for chat bot?

Hi all,

I’ve developed a few small scale Twitch chat bots in java. They all share login information for the bots’ chat listener. I ran into an issue where the IRC authentication token expired or had been reset (it’s a separate account I created for the bot that is never touched). I’d like to put some code in place that would reach out to the Twitch server to obtain current/new OAuth token for the bot upon a failed login. Is there something in the API that I could call that would return that new value?

You will want to look into refresh tokens to deal with access token expiration. You store the refresh token and use that to obtain a new access token when the old one expires.

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