Using this code:
const request = require('request');
let hub = [
`hub.mode=subscribe`, // subscribe
`hub.callback=http://todaytest.proxy.beeceptor.com`,
`hub.lease_seconds=10`, // 864000
"hub.topic=https://api.twitch.tv/helix/users/follows?to_id=29795919" // stream online
].join('&')
request(
{ method: 'POST', json: true, url: 'https://api.twitch.tv/helix/webhooks/hub?' +
hub, headers: {'Client-ID': 'MYCLIENTID',
'Content-Type': 'application/json'}},
function(e,r,b) {
console.log(r.statusCode);
});
Posting to TwitchAPI and sending requests to a mock/capture bin located at
The result is a 202 for the console.log(r.statusCode); and in the bin:
Node v8.11.2
Request v2.87.0
I cannot find a issue with my code, or the code you have presented which indicates the problem is with Twitch and not with you.
Also rip http://requestb.in/ my preferred bin ![]()
Edit: for completeness:
let hub = [
`hub.mode=subscribe`, // subscribe
`hub.callback=http://todaytest.proxy.beeceptor.com/somefolder`,
`hub.lease_seconds=10`, // 864000
"hub.topic=https://api.twitch.tv/helix/users/follows?to_id=29795919" // stream online
].join('&')

