You exchange the access_token as like a normal oAuth via:
NodeJS/Express
request.post({
url: 'https://api.twitch.tv/api/oauth2/token'
+ '?client_id=' + config.twitch.client_id
+ '&client_secret=' + config.twitch.client_secret
+ '&code=' + code
+ '&grant_type=authorization_code'
+ '&redirect_uri=' + config.twitch.redirect,
headers: {
'Accept': 'application/json'
},
json: true,
gzip: true
}, function(e, r, b) {
You don’t send it to https://api.twitch.tv/api/kraken/token but https://api.twitch.tv/api/oauth2/token