Just like the error says, you need to use an auth token.
The subscriptions endpoint requires a User Access Token with the channel:read:subscriptions scope.
The owner of the channel that you want subscriber data for needs to go through your OAuth process to grant you an auth token, and then you can add it to the request as the Authorization header.
Each Webhook’s topic you can test if you can subscribe to the topic by making a fetch call to the topic as each topic has a corresponding helix end point.
So if you can fetch https://api.twitch.tv/helix/subscriptions/events?broadcaster_id=123456789&first=1 then you can create a webhook subscription for it. (easy way to test your token is correct without making a subscription and waiting for data to occur or a denied response)
thx reply.
i solved, can respone message ‘Accept’ but no received data from POST.
my code is >
route.post(’/send’,function (req,res) {
console.log(‘post’);
req.on(‘data’,function(chunk) {
var data = ‘’;
data += chunk.toString();
var rst = JSON.parse(data);
console.log(rst);
});
res.status(200).send(‘done’);
});