Cancel subscribe Webhook events

Someone could give me an example of how to cancel all event registrations by webhook, as I have exceeded the limit and can not sign up for any other topic

follows the error message:

req.body: {"hub.mode":"denied","hub.reason":"exceeded maximum number of allowed subscriptions for topic","hub.topic":"https://api.twitch.tv/helix/streams?user_id=29519987"}

You unsubscribe the same way that you subscribe, except that you set hub.mode to unsubscribe rather than subscribe

https://dev.twitch.tv/docs/api/webhooks-reference/#subscribe-tounsubscribe-from-events

This problem is a use to call to different use to the testing to the testing to the testing and the normal use an url randomization of urls of callback again.

Segue o codigo que estou usando

var options = {
    method: 'POST',
    uri: urlreal,
    json: {
        'hub.callback': 'http://c97ae69f.ngrok.io',
        'hub.mode': 'subscribe',
        'hub.topic': 'https://api.twitch.tv/helix/streams?user_id=<user_id>',
        'hub.lease_seconds': "864000",
        'hub.secret': 'secretrectopul'
    },
    headers: {
        'Content-Type': 'application/json',
        'Client-ID': '<clientID>',
        'Authorization': 'Bearer <AUTH>'
    }
}
  
const req1 = request(options, (err, res, body)=>{
    console.log('Resp Request 1')
    !err ? '' : console.log('Erro: ' + JSON.stringify(err))
    !res ? '' : console.log('res: ' + res.statusCode + ' ' +res.statusMessage)
    !body ? '' : console.log('Body Request 1: '+JSON.stringify(body))
    console.log('=============================================')
})

Calling back is returning this to me.:

HubChallenge: {"hub.mode":"denied","hub.reason":"exceeded maximum number of allowed subscriptions for topic","hub.topic":"https://api.twitch.tv/helix/streams?user_id=29519987"}

Either set your lease times to not ten days, so they nicely die

Or make sure to store your known callbacks so you can end them.

Or use the

To get the list of Webhooks you have so you can iterate and terminate

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.