I am trying to renew the refresh token,
When it expires, I need to go through
1- Get “code” by creating this request
2- Get refresh token by creating this request
POST https://id.twitch.tv/oauth2/token ?client_id=<your client ID> &client_secret=<your client secret> &code=<authorization code received above> &grant_type=authorization_code &redirect_uri=<your registered redirect URI>
3- I keep renewing the access token by
and I keep storing the refresh token that is returned along with access token for reuse.
4- after a couple of months, the refresh token is no longer valid, and I need to repeat these steps again.
so, is there a good way to automate this?,
for example, I’m trying to take authentication GET request out of these steps to be able to automate it.
Any help will be greatly appreciated,