Hello,
Does the Twitch integration automatically refresh access tokens? Their tokens now expire after a certain amount of time so they provide a `refresh_token` which can be used to renew the token before it expires. We are experiencing some issues with our daily processes because sometimes the tokens expire before we can make our requests. Unfortunately it seems the `refresh_token` isn't passed along via the OneAll API so we can't do it on our end but we were hoping that perhaps it's done automatically on your end?
Thank you!
Answers
we have now reviewed our Twitch integration. We have fixed a minor bug during the login (incorrect message when the user cancelled the login) and added the refresh token to the returned result-set.
Could you tell me more about the issues that you are experiencing?
Regards,
Thanks for your quick reply! After the user logs in we need to access some Twitch API endpoints daily to verify/update various information. If the token expires we're unable to do this.
Now that we have access to the refresh token we should be able to detect when the token has expired and request a new token on our side (I still have to test this). The only downside is that OneAll won't have the updated token with the rest of the identity information.
could you please tell me more about the endpoints that you are going to use? Maybe we could add them to our API. So you could use our API directly to gather the info and we would take care of refreshing and updating the token as needed.
Regards,
Certainly - that does sound like it would be ideal.
We're currently using the following:
https://dev.twitch.tv/docs/v5/reference/users#get-user
https://dev.twitch.tv/docs/v5/reference/users#get-users
https://dev.twitch.tv/docs/v5/reference/channels#check-channel-subscription-by-user
https://dev.twitch.tv/docs/v5/reference/users#check-user-subscription-by-channel
Thanks again!
Hello Claude,
I was thinking this over a bit more and I was wondering if it might be easier for OneAll to expose a "refresh" endpoint that we could hit? That way instead of building ways for us to access these endpoints via your API we could just hit your refresh endpoint and update the tokens that you're storing without having to build the refresh logic on our side (which would result in the OneAll token being out of sync).
Thanks.
Hello Claude,
Have there been any updates on this?
Thank you.
I want this too