I made an app where I get some infos from Twitch API, including the moderators of my Twitch channel,
When I access to my website with my Twitch account, I successfully get the moderators data displayed, but it doesn’t work when I log in my website with another Twitch account and I understand why (OAuth Token),
But I want to show who are my moderators to all users logging to my website : isn’t there a way to display these informations to every user ?
Edit : I succeeded to put my moderators into the documents of a collection of a MongoDB database but only when I accept Twitch popup with my twitch account manually. Do you have an idea of how can I automatize the database with a cronjob ? It’s possible to do a request with my twitch account with me doing it and the token expired ?
When you generate a user access token via the “normal” flow
A refresh token is retrurned.
Use the refresh token to get a new token automatically.
That will work fine until the refresh token fails for some reason, then jsut seed the system with a new access token and refresh token.
(Side note: post edit’s won’t notify of a “reply” to a post, so lucky I caught this)