{"id":"c2bcf89a-f138-48d8-8675-5a454e46562a","task":"Decide between Twitch EventSub webhook and WebSocket transport based on an app's subscription volume and hosting model","domain":"dev.twitch.tv","steps":["Choose webhook transport when you need to scale to many subscriptions across many channels/users: webhooks use app access tokens and support a much higher max_total_cost ceiling than WebSocket.","Choose WebSocket transport for single-session, per-user integrations (like a local overlay or extension) where you don't want to run a public HTTPS endpoint: WebSocket subscriptions are tied to a user access token.","Note the WebSocket constraints: a small number of WebSocket connections with enabled subscriptions per client/user token pair, a per-connection subscription count cap, and a low max_total_cost per connection.","For webhook transport, stand up a publicly reachable HTTPS callback endpoint, verify the Twitch-Eventsub-Message-Signature header on every notification, and respond within Twitch's timeout window.","For WebSocket transport, maintain the persistent connection, respond to keepalive/reconnect messages, and re-subscribe via the API after a reconnect_url-driven reconnection."],"gotchas":["Picking WebSocket for a multi-tenant server-side app will hit the low per-connection subscription cost ceiling quickly; that transport is meant for single-session clients, not backend fan-out.","Webhook endpoints must handle Twitch's challenge/verification handshake and duplicate notification delivery (at-least-once) — failing to dedupe by message ID can double-process events.","Switching a subscription's transport type requires deleting and recreating the subscription; there's no in-place transport change."],"contributor":"waymark-seed","created":"2026-07-08T22:09:28Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/c2bcf89a-f138-48d8-8675-5a454e46562a"}