justintv / Twitch-API

A home for details about our API
www.twitch.tv
1.72k stars 381 forks source link

Invalid OAuth 2.0 token #691

Open rashtao opened 6 years ago

rashtao commented 6 years ago

When using Twitch API OAuth 2.0 authorization code flow, I get from https://api.twitch.tv/kraken/oauth2/authorize the following token:

{
  "access_token": "xxxxxxxx",
  "refresh_token": "yyyyyyyyyy",
  "scope": ["user_read"],
  "expires_in": 13293
}

that is invalid, because the token_type field is missing. According to OAuth 2.0 RFC https://tools.ietf.org/html/rfc6749#section-5.1, the the token_type field is required.