Twitch.StreamUpdate
WebSocket event schema, payload, and examples
Properties
The properties defined in the event schema, with descriptions.
broadcaster
object required
id
string
login
string
name
string
type
string
channel
string
channelId
string
createdAt
string required
game
object required
BoxArtUrl
string
Id
string
IGDBId
string
Name
string
isFromSharedChatGuest
boolean required
isInSharedChat
boolean required
isSharedChatHost
boolean required
isTest
boolean required
oldGame
object required
BoxArtUrl
string
Id
string
IGDBId
string
Name
string
oldStatus
string
status
string
Schema
The JSON Schema for the event payload, if available.
schema.json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TwitchChannelUpdateEvent",
"type": "object",
"additionalProperties": false,
"properties": {
"broadcaster": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/$defs/TwitchBaseUser"
}
]
},
"isInSharedChat": {
"type": "boolean"
},
"isSharedChatHost": {
"type": "boolean"
},
"isFromSharedChatGuest": {
"type": "boolean"
},
"createdAt": {
"type": "string"
},
"isTest": {
"type": "boolean"
},
"channelId": {
"type": [
"null",
"string"
]
},
"channel": {
"type": [
"null",
"string"
]
},
"status": {
"type": [
"null",
"string"
]
},
"oldStatus": {
"type": [
"null",
"string"
]
},
"oldGame": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/$defs/GameInfo"
}
]
},
"game": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/$defs/GameInfo"
}
]
}
},
"$defs": {
"TwitchBaseUser": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": [
"null",
"string"
]
},
"login": {
"type": [
"null",
"string"
]
},
"name": {
"type": [
"null",
"string"
]
},
"type": {
"type": [
"null",
"string"
]
}
}
},
"GameInfo": {
"type": "object",
"additionalProperties": false,
"properties": {
"Id": {
"type": [
"null",
"string"
]
},
"Name": {
"type": [
"null",
"string"
]
},
"BoxArtUrl": {
"type": [
"null",
"string"
]
},
"IGDBId": {
"type": [
"null",
"string"
]
}
}
}
}
}
JSON Payload
An example JSON payload for the event, automatically generated using JSONSchemaFaker
example.json
{
"broadcaster": {},
"isInSharedChat": true,
"isSharedChatHost": false,
"isFromSharedChatGuest": true,
"createdAt": "dFeJn",
"isTest": true,
"channelId": "h",
"channel": "UVcC",
"status": "Gh1",
"oldStatus": "FQUOtrgt9",
"oldGame": null,
"game": {}
}
Client Example
Example code showing how to subscribe to this event using the Streamer.bot WebSocket Client
index.js
// Initialize the Streamer.bot WebSocket Client
const client = new StreamerbotClient();
// Subscribe to "Twitch.StreamUpdate" events and register a callback
client.on('Twitch.StreamUpdate', ({ event, data }) => {
// Code here will run every time the event is received!
console.log('Received event:', event.source, event.type);
console.log('Event data:', data);
});
 Â