Subscribing to webhook not working

Hi,

I am trying to subscribe to user follows topic and Twitch is sending back the message to confirm my subscription. Following is the twitch communication to my server.

{“hub_challenge”:“0sh4OT5dIkgL57xAX84vfabxwk89BZKU_MupaRJX”,“hub_lease_seconds”:“864000”,“hub_mode”:“subscribe”,“hub_topic”:“https://api.twitch.tv/helix/users/follows?first=1&to_id=45921770”}

I then tried to see my subscriptions using https://api.twitch.tv/helix/webhooks/subscriptions and it shows 0 subscriptions and I tried to follow a channel as well but I am not getting any callback.

One thing confusing for me was twitch confirms the subscription on GET version of callback and sends POST version of callback when the event happens, so I have both in my controller (Same URL different method).

That message isn’t Twitch confirming the subscription, it’s the Subscription Verify Request (as shown in this example of the webhook subscription flow https://dev.twitch.tv/docs/api/webhooks-reference/#example-of-webhook-flow)

That verification is to check that your callback is accessible, you need to respond back with the hub_challenge to confirm the subscription.

This is standard, as per the WebSub spec, which is what Twitch helped write and as documented…

GET is for verification responses and POST is for “actual” data.

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