Events

Introduction

Think of Blaze Events as the live wire between a channel and your product: the client starts a Socket.IO connection at https://blaze.stream/ws, Blaze returns a sessionId with session_welcome, your backend turns that session into EventSub subscriptions, and the client routes each Handling EventSub notification into the right part of your product. This endpoint is not a native WebSocket URL; use a Socket.IO client library. Token support is event-specific: some EventSub types can be subscribed to with either a user access token or an app access token, while others require a user access token.

Socket.IO endpointhttps://blaze.stream/wsConnect with Socket.IO before creating subscriptions.

The event loop

Use this page as the map from first socket connection to production-ready notification handling.

Open the lane

Start a Socket.IO client at https://blaze.stream/ws and keep the connection alive for the active viewer or tool session.

Attach intent

Pass the sessionId to your backend, choose the EventSub type and condition, then create the subscription with a token accepted by that event type.

Ship the moment

Listen for eventsub and send each payload to the matching UI, alert, bot, or workflow.

Setup

Build in this order: socket, sessionId, subscription, handler. That keeps the connection layer stable while you add new EventSub types.

1

Connect with Socket.IO

Use a Socket.IO client library to connect to https://blaze.stream/ws, then wait for the session_welcome event.

2

Store the sessionId

The session_welcome payload includes the Socket.IO sessionId. Send it to your backend so subscription endpoints can attach event rooms to this live socket.

3

Create a subscription

Call the Subscriptions endpoint with an accepted access token, EventSub type, version, sessionId, and the required condition fields. Check the event's accepted auth type before subscribing.

4

Handle EventSub notifications

When a matching event occurs, Blaze emits an eventsub event to the subscribed Socket.IO session. Use Handling EventSub for routing patterns and payload examples.