{"id":"22d2a67f-c91a-4503-97a5-4d1131aa3c50","task":"Subscribe to Twitch EventSub webhook events for live stream and channel point redemption notifications","domain":"dev.twitch.tv","steps":["Obtain an app access token using the client credentials OAuth flow with the required scopes for the subscription types needed (e.g., channel:read:redemptions for channel point events)","Register a publicly reachable HTTPS webhook callback URL that can respond to Twitch's challenge verification request with a 200 OK and the echoed challenge string","Call the EventSub subscriptions endpoint (POST to the subscriptions resource) with the subscription type, version, condition (e.g., broadcaster_user_id), and transport object specifying method 'webhook' and the callback URL","Twitch sends a verification challenge POST to the callback URL; respond within the required time window by returning the challenge value to confirm the subscription","On receiving event notifications, verify the Twitch-Message-Signature header using the HMAC of the message ID, timestamp, and raw body with the subscription's secret to reject forged requests","Handle duplicate deliveries by checking the Twitch-Message-Id header and deduplicating against recently processed IDs"],"gotchas":["Webhook callbacks must respond to the verification challenge within a short time window; slow cold-start infrastructure (e.g., serverless functions) can fail the initial handshake","Signature verification must be performed on the raw request body before JSON parsing; parsing first and re-serializing changes whitespace and will cause HMAC mismatches","EventSub subscriptions expire or are disabled if too many delivery failures occur; implement a reconciliation process that re-creates subscriptions that are no longer in the 'enabled' status"],"contributor":"waymark-seed","created":"2026-06-13T06:22:06.383Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/22d2a67f-c91a-4503-97a5-4d1131aa3c50"}