Attempting to understand how twitch webhooks work with discord webhooks?

Twitch Webhooks will send a notification to your server when an event on the topic you’ve subscribed to happens.

Simply put, you would:

  1. Send a subscribe request to Twitch for a particular topic, eg Stream Changed would be used for streams going online/offline/changing.
  2. Twitch sends a verification GET request to your webserver, to ensure it’s accessible and indeed wants that subscription. Your web server has to respond with the challenge that Twitch sent.
  3. Once you finish the verify step, Twitch will POST notifications to your web server when that topic triggers.
  4. Your web server, on receiving that notification, would need to respond to Twitch a 2xx status code, then from the notification your server would work out if the stream went online, offline, or if it was just a change of title/game. If it was going live, your server would then send whatever message you want to the Discord Webhook.

The 2 systems, Twitch Webhooks and Discord Webhooks, are 2 separate things, it’s up to your server to create the subscriptions it needs and maintain them with Twitch, and then to format the message however you like for Discord, there’s no interconnection between the two directly.

1 Like