Yes, I sent a token.
Step of code is below.
Step 1:
https://id.twitch.tv/oauth2/authorize?client_id='+config.twitch_getToken.clientID+'&redirect_uri='+config.twitch_getToken.callbackURL+'&response_type=code&scope=channel_subscriptions
Step 2:
https://id.twitch.tv/oauth2/token?client_id=<%=config.clientID%>&client_secret=<%=config.clientSecret%>&code=<%=code_channel_subscriptions%>&grant_type=authorization_code&redirect_uri=<%=config.callbackURL%>
Step 3:
fetch('https://api.twitch.tv/kraken/channels/<%=user.username%>/subscriptions', {
method: 'GET',
headers: new Headers({
'Authorization': 'OAuth ' + data.access_token,
'Client-ID': '<%=config.clientID%>',
'Accept': 'application/vnd.twitchtv.v5+json'
})
}).then(response => response.json()).then(data => {
console.log('get subscriptions === '+JSON.stringify(data));
});
Result:
{“error”:“Forbidden”,“status”:403,“message”:“Unable to access channel subscribers of <channel_id>”}