I’m getting back {"status":400,"message":"Invalid refresh token"}
when trying to refresh an access token.
I make the following request to refresh the token:
POST https://id.twitch.tv/oauth2/token?client_id=xxxx&client_secret=yyy&grant_type=refresh_token&refresh_token=zzz
Here is how my flow works:
- Get code
- Get access token/refresh/expire token from code
- Save access token/refresh/expire token from code
- When making request on behalf user, check if access token has expired. If so, refresh token using the request above and save to database
- Make request using current token
Its possible that tokens aren’t being refreshed within the expiration time but to my understanding, refresh tokens do not expire on the expires_on date.
Any guidance to why I’m having this issue?