I’m implementing webhooks subscription flow using Node.js (koa@2). Everything works fine, though I’m not able to receive an ‘x-hub-signature’ header in verification request from Twitch. My request (using Postman):
curl -X POST \
https://api.twitch.tv/helix/webhooks/hub \
-H 'Client-ID: <client-id>' \
-H 'Content-Type: application/json' \
-d '{
"hub.mode": "subscribe",
"hub.topic": "https://api.twitch.tv/helix/streams?user_id=<user-id>",
"hub.callback": "https://<url>.ngrok.io/wh/<user-token>",
"hub.lease_seconds": "864000",
"hub.secret": "<secret>"
}'
As you can see, I’m using ngrok to tunnel requests to my localhost. This request resolves successfully and triggers verification request from Twitch to my /wh endpoint. It produces a valid query string:
GET /wh/<user-token>?hub.challenge=LK809Zt7ylQm-JwXe6a1_4PC9n-B7c9MG0KXK8WW&hub.lease_seconds=864000&hub.mode=subscribe&hub.topic=https%3A%2F%2Fapi.twitch.tv%2Fhelix%2Fstreams%3Fuser_id%3D<user-id>
But headers doesn’t contain ‘x-hub-signature’. Am I missing something?