router.get('/twitch/webhook', (req, res) => {
// confirms subscription
res.send(<challenge_string>);
});
router.post('/twitch/webhook', (req, res) => {
// my business logic
res.send('OK');
});
Skip the 200’s and just OK and send the challenge string. Shouldn’t be an issue but express will handle the 200 for you.
You do not get unfollow notifications
You might be unfollow/refollowing too quick and the API didn’t clear your follow in order to re-notify for the refollow. Thats why we test follows on “real” data rather than trying to mock/force Webhooks to send with tests