Hello!
1-2 days ago i started my project and i have some issues with getting tokens. I dont uderstand some points in docs.
To get OAuth2 Token firstly i make a GET Request to
https://id.twitch.tv/oauth2/authorize?response_type=code&client_id=${clientId}&redirect_uri=${redirect}&scope=${scopesList.join('+')}&force_verify=true
User authorize and gets redirect to redirect_uri and later i get a “code” and i make a next POST request to:
https://id.twitch.tv/oauth2/token?client_id=${clientId}&client_secret=${clientSecret}&code=${code}&grant_type=authorization_code&redirect_uri=${redirect}
(with post request data)
and get json response
{
“access_token”: “token”,
“refresh_token”: “ref-token”,
“expires_in”: timeInSeconds,
“scope”: “scopes”,
“token_type”: “bearer”
}
it always return token_type bearer and expires_in (some around 15k seconds) but in other endpoints i have to specify authorization type OAuth or Bearer what should i pick ? In the beggining i trying to get oAuth but end with Bearer code.
My second ask is when v5 gonna be departed