I make a request to:
https://api.twitch.tv/kraken/oauth2/token
with params:
{
'code': '***',
'client_secret': '***',
'redirect_uri': 'https://***',
'client_id': '***',
'grant_type': 'authorization_code'
}
and headers:
{
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': '*/*',
'User-Agent': '***'
}
And I get response with response code == 200 and with content:
{
'access_token': '***',
'scope': ['user_read', 'viewing_activity_read'],
'refresh_token': '***'
}
Though in the documentation in section OAuth Authorization Code flow example of response is:
{
"access_token": "<user access token>",
"refresh_token": "<refresh token>",
"expires_in": <number of seconds until the token expires>,
"scope": <your previously listed scope(s)>
}