Stream Offline
The stream.offline subscription type sends a notification when the specified broadcaster stops a stream.
Subscription
- Type
stream.offline- Version
1
Authorization
No authorization required.
Subscription Request Body
typeStringRequiredThe subscription type name:stream.offline.versionStringRequiredThe subscription type version:1.conditionObjectRequiredSubscription-specific parameters. Pass in the broadcaster user ID for the channel you want to get updates for.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredThe broadcaster user ID you want to get stream offline notifications for.
transportObjectRequiredTransport-specific parameters.Hide child attributesShow child attributes
transport.methodStringRequiredThe transport method for EventSub.Possible values
webhookwebsocketconduit
transport.callbackStringThe callback URL where notifications are sent. The URL must use the HTTPS protocol and port 443. See Processing an Event.
Specify this field only if method is set to webhook.
NOTE: Redirects are not followed.
transport.secretStringThe secret used to verify the signature. The secret must be an ASCII string that's a minimum of 10 characters long and a maximum of 100 characters long. For information about how the secret is used, see Verifying the event message.
Specify this field only if the method is set to webhook.
transport.session_idStringAn ID that identifies the WebSocket to send notifications to. When you connect to EventSub using WebSockets, the server returns the ID in the Welcome message.
Specify this field only if the method is set to websocket.
transport.conduit_idStringAn ID that identifies the conduit to send this notification to. When you create a conduit, the server returns the ID in the API response.
Specify this field only if the method is set to conduit.
Event Payload
subscriptionObjectMetadata about the subscription.Hide child attributesShow child attributes
subscription.idStringThe Subscription ID of the subscription.subscription.typeStringThe notification's subscription type.subscription.versionStringThe version of the subscription.subscription.statusStringThe status of the subscription.subscription.costIntegerHow much the subscription counts against your limit. See Subscription Limits for more information.subscription.conditionObjectSubscription-specific parameters.Hide child attributesShow child attributes
subscription.condition.broadcaster_user_idStringThe broadcaster user ID you want to get stream offline notifications for.
subscription.created_atStringThe time the notification was created.subscription.transportObjectTransport-specific parameters.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method for EventSub.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. The URL must use the HTTPS protocol and port 443. See Processing an Event.
Specify this field only if method is set to webhook.
NOTE: Redirects are not followed.
subscription.transport.secretStringThe secret used to verify the signature. The secret must be an ASCII string that's a minimum of 10 characters long and a maximum of 100 characters long. For information about how the secret is used, see Verifying the event message.
Specify this field only if the method is set to webhook.
subscription.transport.session_idStringAn ID that identifies the WebSocket to send notifications to. When you connect to EventSub using WebSockets, the server returns the ID in the Welcome message.
Specify this field only if the method is set to websocket.
subscription.transport.conduit_idStringAn ID that identifies the conduit to send this notification to. When you create a conduit, the server returns the ID in the API response.
Specify this field only if the method is set to conduit.
eventObjectThe event information.Hide child attributesShow child attributes
event.idStringThe id of the stream.event.broadcaster_user_idStringThe broadcaster's user id.event.broadcaster_user_loginStringThe broadcaster's user login.event.broadcaster_user_nameStringThe broadcaster's user display name.
{
"type": "stream.offline",
"version": "1",
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"type": "stream.offline",
"version": "1",
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "websocket",
"session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB"
}
}{
"type": "stream.offline",
"version": "1",
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
}
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "stream.offline",
"version": "1",
"status": "enabled",
"cost": 0,
"condition": {
"broadcaster_user_id": "1337"
},
"created_at": "2019-11-16T10:11:12.634234626Z",
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
}
},
"event": {
"id": "9001",
"broadcaster_user_id": "1337",
"broadcaster_user_login": "cool_user",
"broadcaster_user_name": "Cool_User"
}
}Stream Online
The stream.online subscription type sends a notification when the specified broadcaster starts a stream.
Subscription
- Type
stream.online- Version
1
Authorization
No authorization required.
Subscription Request Body
typeStringRequiredThe subscription type name:stream.online.versionStringRequiredThe subscription type version:1.conditionObjectRequiredSubscription-specific parameters. Pass in the broadcaster user ID for the channel you want to get updates for.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredThe broadcaster user ID you want to get stream online notifications for.
transportObjectRequiredTransport-specific parameters.Hide child attributesShow child attributes
transport.methodStringRequiredThe transport method for EventSub.Possible values
webhookwebsocketconduit
transport.callbackStringThe callback URL where notifications are sent. The URL must use the HTTPS protocol and port 443. See Processing an Event.
Specify this field only if method is set to webhook.
NOTE: Redirects are not followed.
transport.secretStringThe secret used to verify the signature. The secret must be an ASCII string that's a minimum of 10 characters long and a maximum of 100 characters long. For information about how the secret is used, see Verifying the event message.
Specify this field only if the method is set to webhook.
transport.session_idStringAn ID that identifies the WebSocket to send notifications to. When you connect to EventSub using WebSockets, the server returns the ID in the Welcome message.
Specify this field only if the method is set to websocket.
transport.conduit_idStringAn ID that identifies the conduit to send this notification to. When you create a conduit, the server returns the ID in the API response.
Specify this field only if the method is set to conduit.
Event Payload
subscriptionObjectMetadata about the subscription.Hide child attributesShow child attributes
subscription.idStringThe Subscription ID of the subscription.subscription.typeStringThe notification's subscription type.subscription.versionStringThe version of the subscription.subscription.statusStringThe status of the subscription.subscription.costIntegerHow much the subscription counts against your limit. See Subscription Limits for more information.subscription.conditionObjectSubscription-specific parameters.Hide child attributesShow child attributes
subscription.condition.broadcaster_user_idStringThe broadcaster user ID you want to get stream online notifications for.
subscription.created_atStringThe time the notification was created.subscription.transportObjectTransport-specific parameters.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method for EventSub.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. The URL must use the HTTPS protocol and port 443. See Processing an Event.
Specify this field only if method is set to webhook.
NOTE: Redirects are not followed.
subscription.transport.secretStringThe secret used to verify the signature. The secret must be an ASCII string that's a minimum of 10 characters long and a maximum of 100 characters long. For information about how the secret is used, see Verifying the event message.
Specify this field only if the method is set to webhook.
subscription.transport.session_idStringAn ID that identifies the WebSocket to send notifications to. When you connect to EventSub using WebSockets, the server returns the ID in the Welcome message.
Specify this field only if the method is set to websocket.
subscription.transport.conduit_idStringAn ID that identifies the conduit to send this notification to. When you create a conduit, the server returns the ID in the API response.
Specify this field only if the method is set to conduit.
eventObjectThe event information.Hide child attributesShow child attributes
event.idStringThe id of the stream.event.broadcaster_user_idStringThe broadcaster's user id.event.broadcaster_user_loginStringThe broadcaster's user login.event.broadcaster_user_nameStringThe broadcaster's user display name.event.typeStringThe stream type. Valid values are: live, playlist, watch_party, premiere, rerun.event.started_atStringThe timestamp at which the stream went online at.
{
"type": "stream.online",
"version": "1",
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"type": "stream.online",
"version": "1",
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "websocket",
"session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB"
}
}{
"type": "stream.online",
"version": "1",
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
}
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "stream.online",
"version": "1",
"status": "enabled",
"cost": 0,
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
},
"created_at": "2019-11-16T10:11:12.634234626Z"
},
"event": {
"id": "9001",
"broadcaster_user_id": "1337",
"broadcaster_user_login": "cool_user",
"broadcaster_user_name": "Cool_User",
"type": "live",
"started_at": "2020-10-11T10:11:12.123Z"
}
}