Thank you for your quick answer.
I understanded your answer like below.
var url=‘https://api.twitch.tv/kraken/channel’;
var headersArray = [
['Authorization', 'OAuth ' + req.user.accessToken],
['Accept', 'application/vnd.twitchtv.v5+json'],
['Client_Id', config.twitchtv.clientID],
];
request({
url: url,
method: 'GET',
headers: headersArray
},
function (error, response, body) {
if (error) throw error;
console.log(body);
}
);
============================================
Is it correct?
The test result is below.
{“status”:400,“message”:“Invalid authorization code”}
I used accessToken that received token when twitch’s authentication.
Is my method correct ? or Which use token?