Channel Chat Settings Update
This event sends a notification when a broadcaster's chat settings are updated.
Subscription
- Type
channel.chat_settings.update- Version
1
Authorization
Requires one of the following:
- A user access token that includes the user:read:chat scope.
- An app access token.The application, through prior authorization, must have been granted:
- The user:read:chat, user:bot scopes for the user represented by the user_id event condition.
- The channel:bot scope for the user represented by the broadcaster_user_id event condition.
Subscription Request Body
typeStringRequiredThe subscription type name:channel.chat_settings.update.versionStringRequiredThe subscription type version:1.conditionObjectRequiredSubscription-specific parameters.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredUser ID of the channel to receive chat settings update events for.condition.user_idStringRequiredThe user ID to read chat as.
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_idStringUser ID of the channel to receive chat settings update events for.subscription.condition.user_idStringThe user ID to read chat as.
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.broadcaster_user_idStringThe ID of the broadcaster specified in the request.event.broadcaster_user_loginStringThe login of the broadcaster specified in the request.event.broadcaster_user_nameStringThe user name of the broadcaster specified in the request.event.emote_modeBooleanA Boolean value that determines whether chat messages must contain only emotes. True if only messages that are 100% emotes are allowed; otherwise false.event.follower_modeBooleanA Boolean value that determines whether the broadcaster restricts the chat room to followers only, based on how long they've followed.
True if the broadcaster restricts the chat room to followers only; otherwise false.
See
follower_mode_duration_minutesfor how long the followers must have followed the broadcaster to participate in the chat room.event.follower_mode_duration_minutesIntegerNullableThe length of time, in minutes, that the followers must have followed the broadcaster to participate in the chat room. See
follower_mode.Null if
follower_modeis false.event.slow_modeBooleanA Boolean value that determines whether the broadcaster limits how often users in the chat room are allowed to send messages.
Is true, if the broadcaster applies a delay; otherwise, false.
See
slow_mode_wait_time_secondsfor the delay.event.slow_mode_wait_time_secondsIntegerNullableThe amount of time, in seconds, that users need to wait between sending messages. See
slow_mode.Null if
slow_modeis false.event.subscriber_modeBooleanA Boolean value that determines whether only users that subscribe to the broadcaster's channel can talk in the chat room.
True if the broadcaster restricts the chat room to subscribers only; otherwise false.
event.unique_chat_modeBooleanA Boolean value that determines whether the broadcaster requires users to post only unique messages in the chat room.
True if the broadcaster requires unique messages only; otherwise false.
{
"type": "channel.chat_settings.update",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"type": "channel.chat_settings.update",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "websocket",
"session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB"
}
}{
"type": "channel.chat_settings.update",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
}
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "channel.chat_settings.update",
"version": "1",
"status": "enabled",
"cost": 0,
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
},
"created_at": "2023-04-11T10:11:12.123Z"
},
"event": {
"broadcaster_user_id": "1337",
"broadcaster_user_login": "cool_user",
"broadcaster_user_name": "Cool_User",
"emote_mode": true,
"follower_mode": false,
"follower_mode_duration_minutes": null,
"slow_mode": true,
"slow_mode_wait_time_seconds": 10,
"subscriber_mode": false,
"unique_chat_mode": false
}
}Channel Chat Clear
The channel.chat.clear subscription type sends a notification when a moderator or bot clears all messages from the chat room.
Subscription
- Type
channel.chat.clear- Version
1
Authorization
Requires one of the following:
- A user access token that includes the user:read:chat scope.
- An app access token.The application, through prior authorization, must have been granted:
- The user:read:chat, user:bot scopes for the user represented by the user_id event condition.
- The channel:bot scope for the user represented by the broadcaster_user_id event condition.
Subscription Request Body
typeStringRequiredThe subscription type name:channel.chat.clear.versionStringRequiredThe subscription type version:1.conditionObjectRequiredSubscription-specific parameters.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredUser ID of the channel to receive chat clear events for.condition.user_idStringRequiredThe user ID to read chat as.
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_idStringUser ID of the channel to receive chat clear events for.subscription.condition.user_idStringThe user ID to read chat as.
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.broadcaster_user_idStringThe broadcaster user ID.event.broadcaster_user_nameStringThe broadcaster display name.event.broadcaster_user_loginStringThe broadcaster login.
{
"type": "channel.chat.clear",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"type": "channel.chat.clear",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "websocket",
"session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB"
}
}{
"type": "channel.chat.clear",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
}
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "channel.chat.clear",
"version": "1",
"status": "enabled",
"cost": 0,
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
},
"created_at": "2023-04-11T10:11:12.123Z"
},
"event": {
"broadcaster_user_id": "1337",
"broadcaster_user_name": "Cool_User",
"broadcaster_user_login": "cool_user"
}
}Channel Chat Clear User Messages
The channel.chat.clear_user_messages subscription type sends a notification when a moderator or bot clears all messages for a specific user.
Subscription
- Type
channel.chat.clear_user_messages- Version
1
Authorization
Requires one of the following:
- A user access token that includes the user:read:chat scope.
- An app access token.The application, through prior authorization, must have been granted:
- The user:read:chat, user:bot scopes for the user represented by the user_id event condition.
- The channel:bot scope for the user represented by the broadcaster_user_id event condition.
Subscription Request Body
typeStringRequiredThe subscription type name:channel.chat.clear_user_messages.versionStringRequiredThe subscription type version:1.conditionObjectRequiredSubscription-specific parameters.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredUser ID of the channel to receive chat clear user messages events for.condition.user_idStringRequiredThe user ID to read chat as.
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_idStringUser ID of the channel to receive chat clear user messages events for.subscription.condition.user_idStringThe user ID to read chat as.
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.broadcaster_user_idStringThe broadcaster user ID.event.broadcaster_user_nameStringThe broadcaster display name.event.broadcaster_user_loginStringThe broadcaster login.event.target_user_idStringThe ID of the user that was banned or put in a timeout. All of their messages are deleted.event.target_user_nameStringThe user name of the user that was banned or put in a timeout.event.target_user_loginStringThe user login of the user that was banned or put in a timeout.
{
"type": "channel.chat.clear_user_messages",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"type": "channel.chat.clear_user_messages",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "websocket",
"session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB"
}
}{
"type": "channel.chat.clear_user_messages",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
}
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "channel.chat.clear_user_messages",
"version": "1",
"status": "enabled",
"cost": 0,
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
},
"created_at": "2023-04-11T10:11:12.123Z"
},
"event": {
"broadcaster_user_id": "1337",
"broadcaster_user_name": "Cool_User",
"broadcaster_user_login": "cool_user",
"target_user_id": "7734",
"target_user_name": "Uncool_viewer",
"target_user_login": "uncool_viewer"
}
}Channel Chat Message
The channel.chat.message subscription type sends a notification when any user sends a message to a channel's chat room.
Subscription
- Type
channel.chat.message- Version
1
Authorization
Requires one of the following:
- A user access token that includes the user:read:chat scope.
- An app access token.The application, through prior authorization, must have been granted:
- The user:read:chat, user:bot scopes for the user represented by the user_id event condition.
- The channel:bot scope for the user represented by the broadcaster_user_id event condition.
Subscription Request Body
typeStringRequiredThe subscription type name:channel.chat.message.versionStringRequiredThe subscription type version:1.conditionObjectRequiredSubscription-specific parameters.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredThe User ID of the channel to receive chat message events for.condition.user_idStringRequiredThe User ID to read chat as.
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 User ID of the channel to receive chat message events for.subscription.condition.user_idStringThe User ID to read chat as.
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.broadcaster_user_idStringThe broadcaster user ID.event.broadcaster_user_nameStringThe broadcaster display name.event.broadcaster_user_loginStringThe broadcaster login.event.chatter_user_idStringThe user ID of the user that sent the message.event.chatter_user_nameStringThe user name of the user that sent the message.event.chatter_user_loginStringThe user login of the user that sent the message.event.message_idStringA UUID that identifies the message.event.messageObjectThe structured chat message.Hide child attributesShow child attributes
event.message.textStringThe chat message in plain text.event.message.fragmentsObject[]Ordered list of chat message fragments.Hide child attributesShow child attributes
event.message.fragments.typeStringThe type of message fragment.Possible values
textcheermoteemotementiongif
event.message.fragments.textStringMessage text in fragment.event.message.fragments.cheermoteObjectNullableMetadata pertaining to the cheermote.Hide child attributesShow child attributes
event.message.fragments.cheermote.prefixStringThe name portion of the Cheermote string that you use in chat to cheer Bits, converted to lowercase. The full Cheermote string is the concatenation of {prefix} + {number of Bits}.
For example, if the prefix is "cheer" and you want to cheer 100 Bits, the full Cheermote string is cheer100. When the Cheermote string is entered in chat, Twitch converts it to the image associated with the Bits tier that was cheered.
event.message.fragments.cheermote.bitsIntegerThe amount of Bits cheered.event.message.fragments.cheermote.tierIntegerThe tier level of the cheermote.
event.message.fragments.emoteObjectNullableMetadata pertaining to the emote.Hide child attributesShow child attributes
event.message.fragments.emote.idStringAn ID that uniquely identifies this emote.event.message.fragments.emote.emote_set_idStringAn ID that identifies the emote set that the emote belongs to.event.message.fragments.emote.owner_idStringThe ID of the broadcaster who owns the emote.event.message.fragments.emote.formatString[]The formats that the emote is available in. For example, if the emote is available only as a static PNG, the array contains only static. But if the emote is available as a static PNG and an animated GIF, the array contains static and animated.Possible values
animatedAn animated GIF is available for this emote.staticA static PNG file is available for this emote.
event.message.fragments.mentionObjectNullableMetadata pertaining to the mention.Hide child attributesShow child attributes
event.message.fragments.mention.user_idStringThe user ID of the mentioned user.event.message.fragments.mention.user_nameStringThe user name of the mentioned user.event.message.fragments.mention.user_loginStringThe user login of the mentioned user.
event.message.fragments.gifObjectNullableMetadata pertaining to the GIF.Hide child attributesShow child attributes
event.message.fragments.gif.idStringAn ID that uniquely identifies this GIF.event.message.fragments.gif.urlStringThe URL of the GIF asset. Applications rendering the GIF must use the full URL provided; it must not be modified.
event.message_typeStringThe type of message.Possible values
textchannel_points_highlightedchannel_points_sub_onlyuser_intropower_ups_message_effectpower_ups_gigantified_emote
event.badgesObject[]List of chat badges.Hide child attributesShow child attributes
event.badges.set_idStringAn ID that identifies this set of chat badges. For example, Bits or Subscriber.event.badges.idStringAn ID that identifies this version of the badge. The ID can be any value. For example, for Bits, the ID is the Bits tier level, but for World of Warcraft, it could be Alliance or Horde.event.badges.infoStringContains metadata related to the chat badges in the badges tag. Currently, this tag contains metadata only for subscriber badges, to indicate the number of months the user has been a subscriber.
event.cheerObjectNullableMetadata if this message is a cheer.Hide child attributesShow child attributes
event.cheer.bitsIntegerThe amount of Bits the user cheered.
event.colorStringThe color of the user's name in the chat room. This is a hexadecimal RGB color code in the form,#<RGB>. This tag may be empty if it is never set.event.replyObjectNullableMetadata if this message is a reply.Hide child attributesShow child attributes
event.reply.parent_message_idStringAn ID that uniquely identifies the parent message that this message is replying to.event.reply.parent_message_bodyStringThe message body of the parent message.event.reply.parent_user_idStringUser ID of the sender of the parent message.event.reply.parent_user_nameStringUser name of the sender of the parent message.event.reply.parent_user_loginStringUser login of the sender of the parent message.event.reply.thread_message_idStringAn ID that identifies the parent message of the reply thread.event.reply.thread_user_idStringUser ID of the sender of the thread's parent message.event.reply.thread_user_nameStringUser name of the sender of the thread's parent message.event.reply.thread_user_loginStringUser login of the sender of the thread's parent message.
event.channel_points_custom_reward_idStringNullableThe ID of a channel points custom reward that was redeemed.event.source_broadcaster_user_idStringNullableThe broadcaster user ID of the channel the message was sent from. Is null when the message happens in the same channel as the broadcaster. Is not null when in a shared chat session, and the action happens in the channel of a participant other than the broadcaster.event.source_broadcaster_user_nameStringNullableThe user name of the broadcaster of the channel the message was sent from. Is null when the message happens in the same channel as the broadcaster. Is not null when in a shared chat session, and the action happens in the channel of a participant other than the broadcaster.event.source_broadcaster_user_loginStringNullableThe login of the broadcaster of the channel the message was sent from. Is null when the message happens in the same channel as the broadcaster. Is not null when in a shared chat session, and the action happens in the channel of a participant other than the broadcaster.event.source_message_idStringNullableThe UUID that identifies the source message from the channel the message was sent from. Is null when the message happens in the same channel as the broadcaster. Is not null when in a shared chat session, and the action happens in the channel of a participant other than the broadcaster.event.source_badgesObject[]NullableThe list of chat badges for the chatter in the channel the message was sent from. Is null when the message happens in the same channel as the broadcaster. Is not null when in a shared chat session, and the action happens in the channel of a participant other than the broadcaster.Hide child attributesShow child attributes
event.source_badges.set_idStringThe ID that identifies this set of chat badges. For example, Bits or Subscriber.event.source_badges.idStringThe ID that identifies this version of the badge. The ID can be any value. For example, for Bits, the ID is the Bits tier level, but for World of Warcraft, it could be Alliance or Horde.event.source_badges.infoStringContains metadata related to the chat badges in the badges tag. Currently, this tag contains metadata only for subscriber badges, to indicate the number of months the user has been a subscriber.
event.is_source_onlyBooleanNullableDetermines if a message delivered during a shared chat session is only sent to the source channel. Has no effect if the message is not sent during a shared chat session.
{
"type": "channel.chat.message",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"type": "channel.chat.message",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "websocket",
"session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB"
}
}{
"type": "channel.chat.message",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
}
}{
"subscription": {
"id": "0b7f3361-672b-4d39-b307-dd5b576c9b27",
"status": "enabled",
"type": "channel.chat.message",
"version": "1",
"condition": {
"broadcaster_user_id": "1971641",
"user_id": "2914196"
},
"transport": {
"method": "websocket",
"session_id": "AgoQHR3s6Mb4T8GFB1l3DlPfiRIGY2VsbC1h"
},
"created_at": "2023-11-06T18:11:47.492253549Z",
"cost": 0
},
"event": {
"broadcaster_user_id": "1971641",
"broadcaster_user_login": "streamer",
"broadcaster_user_name": "streamer",
"chatter_user_id": "4145994",
"chatter_user_login": "viewer32",
"chatter_user_name": "viewer32",
"message_id": "cc106a89-1814-919d-454c-f4f2f970aae7",
"message": {
"text": "Hi chat",
"fragments": [
{
"type": "text",
"text": "Hi chat",
"cheermote": null,
"emote": null,
"mention": null
}
]
},
"color": "#00FF7F",
"badges": [
{
"set_id": "moderator",
"id": "1",
"info": ""
},
{
"set_id": "subscriber",
"id": "12",
"info": "16"
},
{
"set_id": "sub-gifter",
"id": "1",
"info": ""
}
],
"message_type": "text",
"cheer": null,
"reply": null,
"channel_points_custom_reward_id": null,
"source_broadcaster_user_id": null,
"source_broadcaster_user_login": null,
"source_broadcaster_user_name": null,
"source_message_id": null,
"source_badges": null
}
}Channel Chat Message Delete
The channel.chat.message_delete subscription type sends a notification when a moderator removes a specific message.
Subscription
- Type
channel.chat.message_delete- Version
1
Authorization
Requires one of the following:
- A user access token that includes the user:read:chat scope.
- An app access token.The application, through prior authorization, must have been granted:
- The user:read:chat, user:bot scopes for the user represented by the user_id event condition.
- The channel:bot scope for the user represented by the broadcaster_user_id event condition.
Subscription Request Body
typeStringRequiredThe subscription type name:channel.chat.message_delete.versionStringRequiredThe subscription type version:1.conditionObjectRequiredSubscription-specific parameters.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredUser ID of the channel to receive chat message delete events for.condition.user_idStringRequiredThe user ID to read chat as.
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_idStringUser ID of the channel to receive chat message delete events for.subscription.condition.user_idStringThe user ID to read chat as.
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.broadcaster_user_idStringThe broadcaster user ID.event.broadcaster_user_nameStringThe broadcaster display name.event.broadcaster_user_loginStringThe broadcaster login.event.target_user_idStringThe ID of the user whose message was deleted.event.target_user_nameStringThe user name of the user whose message was deleted.event.target_user_loginStringThe user login of the user whose message was deleted.event.message_idStringA UUID that identifies the message that was removed.
{
"type": "channel.chat.message_delete",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"type": "channel.chat.message_delete",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "websocket",
"session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB"
}
}{
"type": "channel.chat.message_delete",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
}
}Channel Chat Notification
The channel.chat.notification subscription type sends a notification when an event that appears in chat occurs, such as someone subscribing to the channel or a subscription is gifted.
Subscription
- Type
channel.chat.notification- Version
1
Authorization
Requires one of the following:
- A user access token that includes the user:read:chat scope.
- An app access token.The application, through prior authorization, must have been granted:
- The user:read:chat, user:bot scopes for the user represented by the user_id event condition.
- The channel:bot scope for the user represented by the broadcaster_user_id event condition.
Subscription Request Body
typeStringRequiredThe subscription type name:channel.chat.notification.versionStringRequiredThe subscription type version:1.conditionObjectRequiredSubscription-specific parameters.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredUser ID of the channel to receive chat notification events for.condition.user_idStringRequiredThe user ID to read chat as.
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_idStringUser ID of the channel to receive chat notification events for.subscription.condition.user_idStringThe user ID to read chat as.
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.broadcaster_user_idStringThe broadcaster user ID.event.broadcaster_user_nameStringThe broadcaster display name.event.broadcaster_user_loginStringThe broadcaster login.event.chatter_user_idStringThe user ID of the user that sent the message.event.chatter_user_nameStringThe display name of the user that sent the message.event.chatter_user_loginStringThe user login of the user that sent the message.event.chatter_is_anonymousBooleanWhether or not the chatter is anonymous.event.colorStringThe color of the user's name in the chat room.event.badgesObject[]The list of chat badges for the chatter in the channel the message was sent from.Hide child attributesShow child attributes
event.badges.set_idStringAn ID that identifies this set of chat badges. For example, Bits or Subscriber.event.badges.idStringAn ID that identifies this version of the badge. The ID can be any value. For example, for Bits, the ID is the Bits tier level, but for World of Warcraft, it could be Alliance or Horde.event.badges.infoStringContains metadata related to the chat badges in the badges tag. Currently, this tag contains metadata only for subscriber badges, to indicate the number of months the user has been a subscriber.
event.system_messageStringThe message Twitch shows in the chat room for this notice.event.message_idStringA UUID that identifies the message.event.messageObjectThe structured chat message.Hide child attributesShow child attributes
event.message.textStringThe chat message in plain text.event.message.fragmentsObject[]Ordered list of chat message fragments.Hide child attributesShow child attributes
event.message.fragments.typeStringThe type of message fragment.Possible values
textcheermoteemotemention
event.message.fragments.textStringMessage text in fragment.event.message.fragments.cheermoteObjectNullableMetadata pertaining to the cheermote.Hide child attributesShow child attributes
event.message.fragments.cheermote.prefixStringThe name portion of the Cheermote string that you use in chat to cheer Bits, converted to lowercase. The full Cheermote string is the concatenation of {prefix} + {number of Bits}.
For example, if the prefix is "cheer" and you want to cheer 100 Bits, the full Cheermote string is cheer100. When the Cheermote string is entered in chat, Twitch converts it to the image associated with the Bits tier that was cheered.
event.message.fragments.cheermote.bitsIntegerThe amount of Bits cheered.event.message.fragments.cheermote.tierIntegerThe tier level of the cheermote.
event.message.fragments.emoteObjectNullableMetadata pertaining to the emote.Hide child attributesShow child attributes
event.message.fragments.emote.idStringAn ID that uniquely identifies this emote.event.message.fragments.emote.emote_set_idStringAn ID that identifies the emote set that the emote belongs to.event.message.fragments.emote.owner_idStringThe ID of the broadcaster who owns the emote.event.message.fragments.emote.formatString[]The formats that the emote is available in. For example, if the emote is available only as a static PNG, the array contains only static. But if the emote is available as a static PNG and an animated GIF, the array contains static and animated.Possible values
animatedAn animated GIF is available for this emote.staticA static PNG file is available for this emote.
event.message.fragments.mentionObjectNullableMetadata pertaining to the mention.Hide child attributesShow child attributes
event.message.fragments.mention.user_idStringThe user ID of the mentioned user.event.message.fragments.mention.user_nameStringThe user name of the mentioned user.event.message.fragments.mention.user_loginStringThe user login of the mentioned user.
event.notice_typeStringThe type of notice.Possible values
subresubsub_giftcommunity_sub_giftgift_paid_upgradeprime_paid_upgraderaidunraidpay_it_forwardannouncementbits_badge_tiercharity_donationwatch_streakmodiversarygifted_drops_summaryshared_chat_subshared_chat_resubshared_chat_sub_giftshared_chat_community_sub_giftshared_chat_gift_paid_upgradeshared_chat_prime_paid_upgradeshared_chat_raidshared_chat_pay_it_forwardshared_chat_announcementshared_chat_modiversaryshared_chat_gifted_drops_summaryunknown
event.subObjectNullableInformation about the sub event. Null ifnotice_typeis notsub.Hide child attributesShow child attributes
event.sub.sub_tierStringThe type of subscription plan being used.Possible values
1000First level of paid or Prime subscription.2000Second level of paid subscription.3000Third level of paid subscription.
event.sub.is_primeBooleanIndicates if the subscription was obtained through Amazon Prime.event.sub.duration_monthsIntegerThe number of months the subscription is for.
event.resubObjectNullableInformation about the resub event. Null ifnotice_typeis notresub.Hide child attributesShow child attributes
event.resub.cumulative_monthsIntegerThe total number of months the user has subscribed.event.resub.duration_monthsIntegerThe number of months the subscription is for.event.resub.streak_monthsIntegerNullableThe total number of months the user has subscribed.event.resub.sub_tierStringThe type of subscription plan being used.Possible values
1000First level of paid or Prime subscription.2000Second level of paid subscription.3000Third level of paid subscription.
event.resub.is_primeBooleanNullableWhether or not this subscription is a Prime subscription.event.resub.is_giftBooleanWhether or not the resub was a result of a gift.event.resub.gifter_is_anonymousBooleanNullableWhether or not the gift was anonymous.event.resub.gifter_user_idStringNullableThe user ID of the subscription gifter. Null if anonymous.event.resub.gifter_user_nameStringNullableThe user name of the subscription gifter. Null if anonymous.event.resub.gifter_user_loginStringNullableThe user login of the subscription gifter. Null if anonymous.
event.sub_giftObjectNullableInformation about the gift sub event. Null if notice_type is not sub_gift.Hide child attributesShow child attributes
event.sub_gift.duration_monthsIntegerThe number of months the subscription is for.event.sub_gift.cumulative_totalIntegerNullableThe amount of gifts the gifter has given in this channel. Null if anonymous.event.sub_gift.recipient_user_idStringThe user ID of the subscription gift recipient.event.sub_gift.recipient_user_nameStringThe user name of the subscription gift recipient.event.sub_gift.recipient_user_loginStringThe user login of the subscription gift recipient.event.sub_gift.sub_tierStringThe type of subscription plan being used.Possible values
1000First level of paid or Prime subscription.2000Second level of paid subscription.3000Third level of paid subscription.
event.sub_gift.community_gift_idStringNullableThe ID of the associated community gift. Null if not associated with a community gift.
event.community_sub_giftObjectNullableInformation about the community gift sub event. Null ifnotice_typeis notcommunity_sub_gift.Hide child attributesShow child attributes
event.community_sub_gift.idStringThe ID of the associated community gift.event.community_sub_gift.totalIntegerNumber of subscriptions being gifted.event.community_sub_gift.sub_tierStringThe type of subscription plan being used.Possible values
1000First level of paid or Prime subscription.2000Second level of paid subscription.3000Third level of paid subscription.
event.community_sub_gift.cumulative_totalIntegerNullableThe amount of gifts the gifter has given in this channel. Null if anonymous.
event.gift_paid_upgradeObjectNullableInformation about the community gift paid upgrade event. Null ifnotice_typeis notgift_paid_upgrade.Hide child attributesShow child attributes
event.gift_paid_upgrade.gifter_is_anonymousBooleanWhether the gift was given anonymously.event.gift_paid_upgrade.gifter_user_idStringNullableThe user ID of the user who gifted the subscription. Null if anonymous.event.gift_paid_upgrade.gifter_user_nameStringNullableThe user name of the user who gifted the subscription. Null if anonymous.
event.prime_paid_upgradeObjectNullableInformation about the Prime gift paid upgrade event. Null ifnotice_typeis notprime_paid_upgradeHide child attributesShow child attributes
event.prime_paid_upgrade.sub_tierStringThe type of subscription plan being used.Possible values
1000First level of paid or Prime subscription.2000Second level of paid subscription.3000Third level of paid subscription.
event.pay_it_forwardObjectNullableInformation about the pay it forward event. Null ifnotice_typeis notpay_it_forwardHide child attributesShow child attributes
event.pay_it_forward.gifter_is_anonymousBooleanWhether the gift was given anonymously.event.pay_it_forward.gifter_user_idStringNullableThe user ID of the user who gifted the subscription. Null if anonymous.event.pay_it_forward.gifter_user_nameStringNullableThe user name of the user who gifted the subscription. Null if anonymous.event.pay_it_forward.gifter_user_loginStringNullableThe user login of the user who gifted the subscription. Null if anonymous.
event.raidObjectNullableInformation about the raid event. Null ifnotice_typeis notraidHide child attributesShow child attributes
event.raid.user_idStringThe user ID of the broadcaster raiding this channel.event.raid.user_nameStringThe user name of the broadcaster raiding this channel.event.raid.user_loginStringThe login name of the broadcaster raiding this channel.event.raid.viewer_countIntegerThe number of viewers raiding this channel from the broadcaster's channel.event.raid.profile_image_urlStringProfile image URL of the broadcaster raiding this channel.
event.unraidObjectNullableReturns an empty payload ifnotice_typeisunraid, otherwise returns null.event.announcementObjectNullableInformation about the announcement event. Null ifnotice_typeis notannouncementHide child attributesShow child attributes
event.announcement.colorStringColor of the announcement.
event.bits_badge_tierObjectNullableInformation about the Bits badge tier event. Null ifnotice_typeis notbits_badge_tierHide child attributesShow child attributes
event.bits_badge_tier.tierIntegerThe tier of the Bits badge the user just earned. For example, 100, 1000, or 10000.
event.charity_donationObjectNullableInformation about the announcement event. Null ifnotice_typeis notcharity_donationHide child attributesShow child attributes
event.charity_donation.charity_nameStringName of the charity.event.charity_donation.amountObjectAn object that contains the amount of money that the user paid.Hide child attributesShow child attributes
event.charity_donation.amount.valueIntegerThe monetary amount. The amount is specified in the currency's minor unit. For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550.event.charity_donation.amount.decimal_placeIntegerThe number of decimal places used by the currency. For example, USD uses two decimal places.event.charity_donation.amount.currencyStringThe ISO-4217 three-letter currency code that identifies the type of currency in value.
event.watch_streakObjectNullableInformation about the Watch Streak event. Null ifnotice_typeis notwatch_streak.Hide child attributesShow child attributes
event.watch_streak.streak_countIntegerThe number of consecutive broadcasts for which the user has been watching.event.watch_streak.channel_points_awardedIntegerThe number of channel points awarded for the Watch Streak milestone.
event.modiversaryObjectNullableInformation about the modiversary event. Null ifnotice_typeis notmodiversary.Hide child attributesShow child attributes
event.modiversary.monthsIntegerThe number of months the user has been a moderator in this channel.
event.gifted_drops_summaryObjectNullableInformation about the gifted Drops summary event. Null ifnotice_typeis notgifted_drops_summaryHide child attributesShow child attributes
event.gifted_drops_summary.recipient_countIntegerThe number of users who received a gifted Drop.
event.source_broadcaster_user_idStringNullableThe broadcaster user ID of the channel the message was sent from. Is null when the message notification happens in the same channel as the broadcaster. Is not null when in a shared chat session, and the action happens in the channel of a participant other than the broadcaster.event.source_broadcaster_user_nameStringNullableThe user name of the broadcaster of the channel the message was sent from. Is null when the message notification happens in the same channel as the broadcaster. Is not null when in a shared chat session, and the action happens in the channel of a participant other than the broadcaster.event.source_broadcaster_user_loginStringNullableThe login of the broadcaster of the channel the message was sent from. Is null when the message notification happens in the same channel as the broadcaster. Is not null when in a shared chat session, and the action happens in the channel of a participant other than the broadcaster.event.source_message_idStringNullableThe UUID that identifies the source message from the channel the message was sent from. Is null when the message happens in the same channel as the broadcaster. Is not null when in a shared chat session, and the action happens in the channel of a participant other than the broadcaster.event.source_badgesObject[]NullableThe list of chat badges for the chatter in the channel the message was sent from. Is null when the message happens in the same channel as the broadcaster. Is not null when in a shared chat session, and the action happens in the channel of a participant other than the broadcaster.Hide child attributesShow child attributes
event.source_badges.set_idStringThe ID that identifies this set of chat badges. For example, Bits or Subscriber.event.source_badges.idStringThe ID that identifies this version of the badge. The ID can be any value. For example, for Bits, the ID is the Bits tier level, but for World of Warcraft, it could be Alliance or Horde.event.source_badges.infoStringContains metadata related to the chat badges in the badges tag. Currently, this tag contains metadata only for subscriber badges, to indicate the number of months the user has been a subscriber.
event.is_source_onlyBooleanNullableWhether the notification is only sent to the source channel. Is null if the notification is not in a shared chat session.event.shared_chat_subObjectNullableInformation about theshared_chat_subevent. Is null ifnotice_typeis notshared_chat_sub. This field has the same information as thesubfield but for a notice that happened for a channel in a shared chat session other than the broadcaster in the subscription condition.event.shared_chat_resubObjectNullableInformation about theshared_chat_resubevent. Is null ifnotice_typeis notshared_chat_resub. This field has the same information as theresubfield but for a notice that happened for a channel in a shared chat session other than the broadcaster in the subscription condition.event.shared_chat_sub_giftObjectNullableInformation about theshared_chat_sub_giftevent. Is null ifnotice_typeis notshared_chat_sub_gift. This field has the same information as thechat_sub_giftfield but for a notice that happened for a channel in a shared chat session other than the broadcaster in the subscription condition.event.shared_chat_community_sub_giftObjectNullableInformation about theshared_chat_community_sub_giftevent. Is null ifnotice_typeis notshared_chat_community_sub_gift. This field has the same information as thecommunity_sub_giftfield but for a notice that happened for a channel in a shared chat session other than the broadcaster in the subscription condition.event.shared_chat_gift_paid_upgradeObjectNullableInformation about theshared_chat_gift_paid_upgradeevent. Is null ifnotice_typeis notshared_chat_gift_paid_upgrade. This field has the same information as thegift_paid_upgradefield but for a notice that happened for a channel in a shared chat session other than the broadcaster in the subscription condition.event.shared_chat_prime_paid_upgradeObjectNullableInformation about theshared_chat_chat_prime_paid_upgradeevent. Is null ifnotice_typeis notshared_chat_prime_paid_upgrade. This field has the same information as theprime_paid_upgradefield but for a notice that happened for a channel in a shared chat session other than the broadcaster in the subscription condition.event.shared_chat_pay_it_forwardObjectNullableInformation about theshared_chat_pay_it_forwardevent. Is null ifnotice_typeis notshared_chat_pay_it_forward. This field has the same information as thepay_it_forwardfield but for a notice that happened for a channel in a shared chat session other than the broadcaster in the subscription condition.event.shared_chat_raidObjectNullableInformation about theshared_chat_raidevent. Is null ifnotice_typeis notshared_chat_raid. This field has the same information as theraidfield but for a notice that happened for a channel in a shared chat session other than the broadcaster in the subscription condition.event.shared_chat_announcementObjectNullableInformation about theshared_chat_announcementevent. Is null ifnotice_typeis notshared_chat_announcement. This field has the same information as theannouncementfield but for a notice that happened for a channel in a shared chat session other than the broadcaster in the subscription condition.event.shared_chat_modiversaryObjectNullableInformation about theshared_chat_modiversaryevent. Is null ifnotice_typeis notshared_chat_modiversary. This field has the same information as themodiversaryfield but for a notice that happened for a channel in a shared chat session other than the broadcaster in the subscription condition.event.shared_chat_gifted_drops_summaryObjectNullableInformation about theshared_chat_gifted_drops_summaryevent. Is null ifnotice_typeis notshared_chat_gifted_drops_summary. This field has the same information as thegifted_drops_summaryfield but for a notice that happened for a channel in a shared chat session other than the broadcaster in the subscription condition.
{
"type": "channel.chat.notification",
"version": "1",
"condition": {
"broadcaster_user_id": "1971641",
"user_id": "2914196"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"type": "channel.chat.notification",
"version": "1",
"condition": {
"broadcaster_user_id": "1971641",
"user_id": "2914196"
},
"transport": {
"method": "websocket",
"session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB"
}
}{
"type": "channel.chat.notification",
"version": "1",
"condition": {
"broadcaster_user_id": "1971641",
"user_id": "2914196"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
}
}{
"subscription": {
"id": "dc1a3cfc-a930-4972-bf9e-0ffc4e7a8996",
"status": "enabled",
"type": "channel.chat.notification",
"version": "1",
"condition": {
"broadcaster_user_id": "1971641",
"user_id": "2914196"
},
"transport": {
"method": "websocket",
"session_id": "AgoQOtgGkFvXRlSkij343CndhIGY2VsbC1h"
},
"created_at": "2023-10-06T18:04:38.807682738Z",
"cost": 0
},
"event": {
"broadcaster_user_id": "1971641",
"broadcaster_user_login": "streamer",
"broadcaster_user_name": "streamer",
"chatter_user_id": "49912639",
"chatter_user_login": "viewer23",
"chatter_user_name": "viewer23",
"chatter_is_anonymous": false,
"color": "",
"badges": [],
"system_message": "viewer23 subscribed at Tier 1. They've subscribed for 10 months!",
"message_id": "d62235c8-47ff-a4f4--84e8-5a29a65a9c03",
"message": {
"text": "",
"fragments": []
},
"notice_type": "resub",
"sub": null,
"resub": {
"cumulative_months": 10,
"duration_months": 0,
"streak_months": null,
"sub_plan": "1000",
"is_gift": false,
"gifter_is_anonymous": null,
"gifter_user_id": null,
"gifter_user_name": null,
"gifter_user_login": null
},
"sub_gift": null,
"community_sub_gift": null,
"gift_paid_upgrade": null,
"prime_paid_upgrade": null,
"pay_it_forward": null,
"raid": null,
"unraid": null,
"announcement": null,
"bits_badge_tier": null,
"charity_donation": null,
"watch_streak": null,
"modiversary": null,
"shared_chat_sub": null,
"shared_chat_resub": null,
"shared_chat_sub_gift": null,
"shared_chat_community_sub_gift": null,
"shared_chat_gift_paid_upgrade": null,
"shared_chat_prime_paid_upgrade": null,
"shared_chat_pay_it_forward": null,
"shared_chat_raid": null,
"shared_chat_announcement": null,
"shared_chat_modiversary": null,
"source_broadcaster_user_id": null,
"source_broadcaster_user_login": null,
"source_broadcaster_user_name": null,
"source_message_id": null,
"source_badges": null,
"is_source_only": null
}
}Channel Chat User Message Hold
The channel.chat.user_message_hold subscription type notifies a user if their message is caught by AutoMod.
Subscription
- Type
channel.chat.user_message_hold- Version
1
Authorization
Requires one of the following:
- A user access token that includes the user:read:chat scope.
- An app access token.The application, through prior authorization, must have been granted:
- The user:read:chat, user:bot scopes for the user represented by the user_id event condition.
Subscription Request Body
typeStringRequiredThe subscription type name:channel.chat.user_message_hold.versionStringRequiredThe subscription type version:1.conditionObjectRequiredSubscription-specific parameters.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredUser ID of the channel to receive chat message events for.condition.user_idStringRequiredThe user ID to read chat as.
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_idStringUser ID of the channel to receive chat message events for.subscription.condition.user_idStringThe user ID to read chat as.
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.broadcaster_user_idStringThe ID of the broadcaster specified in the request.event.broadcaster_user_loginStringThe login of the broadcaster specified in the request.event.broadcaster_user_nameStringThe user name of the broadcaster specified in the request.event.user_idStringThe User ID of the message sender.event.user_loginStringThe message sender's login.event.user_nameStringThe message sender's display name.event.message_idStringThe ID of the message that was flagged by automod.event.messageObjectThe body of the message.Hide child attributesShow child attributes
event.message.textStringThe contents of the message caught by automod.event.message.fragmentsObject[]Ordered list of chat message fragments.Hide child attributesShow child attributes
event.message.fragments.typeStringThe type of message fragment.Possible values
textcheermoteemotementiongif
event.message.fragments.textStringMessage text in a fragment.event.message.fragments.emoteObjectNullableMetadata pertaining to the emote.Hide child attributesShow child attributes
event.message.fragments.emote.idStringAn ID that uniquely identifies this emote.event.message.fragments.emote.emote_set_idStringAn ID that identifies the emote set that the emote belongs to.
event.message.fragments.cheermoteObjectNullableMetadata pertaining to the cheermote.Hide child attributesShow child attributes
event.message.fragments.cheermote.prefixStringThe name portion of the Cheermote string that you use in chat to cheer Bits, converted to lowercase. The full Cheermote string is the concatenation of {prefix} + {number of Bits}.
For example, if the prefix is "cheer" and you want to cheer 100 Bits, the full Cheermote string is cheer100. When the Cheermote string is entered in chat, Twitch converts it to the image associated with the Bits tier that was cheered.
event.message.fragments.cheermote.bitsIntegerThe amount of Bits cheered.event.message.fragments.cheermote.tierIntegerThe tier level of the cheermote.
{
"type": "channel.chat.user_message_hold",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"type": "channel.chat.user_message_hold",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "websocket",
"session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB"
}
}{
"type": "channel.chat.user_message_hold",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
}
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "channel.chat.user_message_hold",
"version": "1",
"status": "enabled",
"cost": 0,
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
},
"created_at": "2023-04-11T10:11:12.123Z"
},
"event": {
"broadcaster_user_id": "123",
"broadcaster_user_login": "bob",
"broadcaster_user_name": "Bob",
"user_id": "456",
"user_login": "tom",
"user_name": "Tommy",
"message_id": "789",
"message": {
"text": "hey world",
"fragments": [
{
"type": "emote",
"text": "hey world",
"cheermote": null,
"emote": {
"id": "foo",
"emote_set_id": "7"
}
},
{
"type": "cheermote",
"text": "bye world",
"cheermote": {
"prefix": "prefix",
"bits": 100,
"tier": 1
},
"emote": null
},
{
"type": "text",
"text": "surprise",
"cheermote": null,
"emote": null
}
]
}
}
}Channel Chat User Message Update
The channel.chat.user_message_update subscription type notifies a user if their message's AutoMod status is updated.
Subscription
- Type
channel.chat.user_message_update- Version
1
Authorization
Requires one of the following:
- A user access token that includes the user:read:chat scope.
- An app access token.The application, through prior authorization, must have been granted:
- The user:read:chat, user:bot scopes for the user represented by the user_id event condition.
Subscription Request Body
typeStringRequiredThe subscription type name:channel.chat.user_message_update.versionStringRequiredThe subscription type version:1.conditionObjectRequiredSubscription-specific parameters.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredUser ID of the channel to receive chat message events for.condition.user_idStringRequiredThe user ID to read chat as.
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_idStringUser ID of the channel to receive chat message events for.subscription.condition.user_idStringThe user ID to read chat as.
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.broadcaster_user_idStringThe ID of the broadcaster specified in the request.event.broadcaster_user_loginStringThe login of the broadcaster specified in the request.event.broadcaster_user_nameStringThe user name of the broadcaster specified in the request.event.user_idStringThe User ID of the message sender.event.user_loginStringThe message sender's login.event.user_nameStringThe message sender's user name.event.statusStringThe message's status.Possible values
approveddeniedinvalid
event.message_idStringThe ID of the message that was flagged by automod.event.messageObjectThe body of the message.Hide child attributesShow child attributes
event.message.textStringThe contents of the message caught by automod.event.message.fragmentsObject[]Ordered list of chat message fragments.Hide child attributesShow child attributes
event.message.fragments.typeStringThe type of message fragment.Possible values
textcheermoteemotementiongif
event.message.fragments.textStringMessage text in a fragment.event.message.fragments.emoteObjectNullableMetadata pertaining to the emote.Hide child attributesShow child attributes
event.message.fragments.emote.idStringAn ID that uniquely identifies this emote.event.message.fragments.emote.emote_set_idStringAn ID that identifies the emote set that the emote belongs to.
event.message.fragments.cheermoteObjectNullableMetadata pertaining to the cheermote.Hide child attributesShow child attributes
event.message.fragments.cheermote.prefixStringThe name portion of the Cheermote string that you use in chat to cheer Bits, converted to lowercase. The full Cheermote string is the concatenation of {prefix} + {number of Bits}.
For example, if the prefix is "cheer" and you want to cheer 100 Bits, the full Cheermote string is cheer100. When the Cheermote string is entered in chat, Twitch converts it to the image associated with the Bits tier that was cheered.
event.message.fragments.cheermote.bitsIntegerThe amount of Bits cheered.event.message.fragments.cheermote.tierIntegerThe tier level of the cheermote.
{
"type": "channel.chat.user_message_update",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"type": "channel.chat.user_message_update",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "websocket",
"session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB"
}
}{
"type": "channel.chat.user_message_update",
"version": "1",
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
}
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "channel.chat.user_message_update",
"version": "1",
"status": "enabled",
"cost": 0,
"condition": {
"broadcaster_user_id": "1337",
"user_id": "9001"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
},
"created_at": "2023-04-11T10:11:12.123Z"
},
"event": {
"broadcaster_user_id": "123",
"broadcaster_user_login": "bob",
"broadcaster_user_name": "Bob",
"user_id": "456",
"user_login": "tom",
"user_name": "Tommy",
"status": "approved",
"message_id": "789",
"message": {
"text": "hey world",
"fragments": [
{
"type": "emote",
"text": "hey world",
"cheermote": null,
"emote": {
"id": "foo",
"emote_set_id": "7"
}
},
{
"type": "cheermote",
"text": "bye world",
"cheermote": {
"prefix": "prefix",
"bits": 100,
"tier": 1
},
"emote": null
},
{
"type": "text",
"text": "surprise",
"cheermote": null,
"emote": null
}
]
}
}
}Channel Shared Chat Session Begin
The channel.shared_chat.begin subscription type sends a notification when a channel becomes active in an active shared chat session.
Subscription
- Type
channel.shared_chat.begin- Version
1
Authorization
No authorization required.
Subscription Request Body
typeStringRequiredThe subscription type name:channel.shared_chat.begin.versionStringRequiredThe subscription type version:1.conditionObjectRequiredSubscription-specific parameters.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredThe User ID of the channel to receive shared chat session begin events 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 User ID of the channel to receive shared chat session begin events 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.session_idStringThe unique identifier for the shared chat session.event.broadcaster_user_idStringThe User ID of the channel in the subscription condition which is now active in the shared chat session.event.broadcaster_user_nameStringThe display name of the channel in the subscription condition which is now active in the shared chat session.event.broadcaster_user_loginStringThe user login of the channel in the subscription condition which is now active in the shared chat session.event.host_broadcaster_user_idStringThe User ID of the host channel.event.host_broadcaster_user_nameStringThe display name of the host channel.event.host_broadcaster_user_loginStringThe user login of the host channel.event.participantsObject[]The list of participants in the session.Hide child attributesShow child attributes
event.participants.broadcaster_user_idStringThe User ID of the participant channel.event.participants.broadcaster_user_nameStringThe display name of the participant channel.event.participants.broadcaster_user_loginStringThe user login of the participant channel.
{
"type": "channel.shared_chat.begin",
"version": "1",
"condition": {
"broadcaster_user_id": "1971641"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"type": "channel.shared_chat.begin",
"version": "1",
"condition": {
"broadcaster_user_id": "1971641"
},
"transport": {
"method": "websocket",
"session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB"
}
}{
"type": "channel.shared_chat.begin",
"version": "1",
"condition": {
"broadcaster_user_id": "1971641"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
}
}{
"subscription": {
"id": "bf0602d2-5b39-4ece-b1a4-44191d52df6b",
"status": "enabled",
"type": "channel.shared_chat.begin",
"version": "1",
"condition": {
"broadcaster_user_id": "1971641"
},
"transport": {
"method": "websocket",
"session_id": "AgoQOtgGkFvXRlSkij343CndhIGY2VsbC1h"
},
"created_at": "2023-10-06T18:04:38.807682738Z",
"cost": 0
},
"event": {
"session_id": "2b64a92a-dbb8-424e-b1c3-304423ba1b6f",
"broadcaster_user_id": "1971641",
"broadcaster_user_login": "streamer",
"broadcaster_user_name": "streamer",
"host_broadcaster_user_id": "1971641",
"host_broadcaster_user_login": "streamer",
"host_broadcaster_user_name": "streamer",
"participants": [
{
"broadcaster_user_id": "1971641",
"broadcaster_user_name": "streamer",
"broadcaster_user_login": "streamer"
},
{
"broadcaster_user_id": "112233",
"broadcaster_user_name": "streamer33",
"broadcaster_user_login": "streamer33"
}
]
}
}Channel Shared Chat Session End
The channel.shared_chat.end subscription type sends a notification when a channel leaves a shared chat session or the session ends.
Subscription
- Type
channel.shared_chat.end- Version
1
Authorization
No authorization required.
Subscription Request Body
typeStringRequiredThe subscription type name:channel.shared_chat.end.versionStringRequiredThe subscription type version:1.conditionObjectRequiredSubscription-specific parameters.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredThe User ID of the channel to receive shared chat session end events 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 User ID of the channel to receive shared chat session end events 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.session_idStringThe unique identifier for the shared chat session.event.broadcaster_user_idStringThe User ID of the channel in the subscription condition which is no longer active in the shared chat session.event.broadcaster_user_nameStringThe display name of the channel in the subscription condition which is no longer active in the shared chat session.event.broadcaster_user_loginStringThe user login of the channel in the subscription condition which is no longer active in the shared chat session.event.host_broadcaster_user_idStringThe User ID of the host channel.event.host_broadcaster_user_nameStringThe display name of the host channel.event.host_broadcaster_user_loginStringThe user login of the host channel.
{
"type": "channel.shared_chat.end",
"version": "1",
"condition": {
"broadcaster_user_id": "1971641"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"type": "channel.shared_chat.end",
"version": "1",
"condition": {
"broadcaster_user_id": "1971641"
},
"transport": {
"method": "websocket",
"session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB"
}
}{
"type": "channel.shared_chat.end",
"version": "1",
"condition": {
"broadcaster_user_id": "1971641"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
}
}{
"subscription": {
"id": "84a875f1-1dc0-43b2-8ed3-d7db4d650c37",
"status": "enabled",
"type": "channel.shared_chat.end",
"version": "1",
"condition": {
"broadcaster_user_id": "112233"
},
"transport": {
"method": "websocket",
"session_id": "AgoQOtgGkFvXRlSkij343CndhIGY2VsbC1h"
},
"created_at": "2023-10-06T18:04:38.807682738Z",
"cost": 0
},
"event": {
"session_id": "2b64a92a-dbb8-424e-b1c3-304423ba1b6f",
"broadcaster_user_id": "1971641",
"broadcaster_user_login": "streamer",
"broadcaster_user_name": "streamer",
"host_broadcaster_user_id": "1971641",
"host_broadcaster_user_login": "streamer",
"host_broadcaster_user_name": "streamer"
}
}Channel Shared Chat Session Update
The channel.shared_chat.update subscription type sends a notification when the active shared chat session the channel is in changes.
Subscription
- Type
channel.shared_chat.update- Version
1
Authorization
No authorization required.
Subscription Request Body
typeStringRequiredThe subscription type name:channel.shared_chat.update.versionStringRequiredThe subscription type version:1.conditionObjectRequiredSubscription-specific parameters.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredThe User ID of the channel to receive shared chat session update events 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 User ID of the channel to receive shared chat session update events 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.session_idStringThe unique identifier for the shared chat session.event.broadcaster_user_idStringThe User ID of the channel in the subscription condition.event.broadcaster_user_nameStringThe display name of the channel in the subscription condition.event.broadcaster_user_loginStringThe user login of the channel in the subscription condition.event.host_broadcaster_user_idStringThe User ID of the host channel.event.host_broadcaster_user_nameStringThe display name of the host channel.event.host_broadcaster_user_loginStringThe user login of the host channel.event.participantsObject[]The list of participants in the session.Hide child attributesShow child attributes
event.participants.broadcaster_user_idStringThe User ID of the participant channel.event.participants.broadcaster_user_nameStringThe display name of the participant channel.event.participants.broadcaster_user_loginStringThe user login of the participant channel.
{
"type": "channel.shared_chat.update",
"version": "1",
"condition": {
"broadcaster_user_id": "1971641"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"type": "channel.shared_chat.update",
"version": "1",
"condition": {
"broadcaster_user_id": "1971641"
},
"transport": {
"method": "websocket",
"session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB"
}
}{
"type": "channel.shared_chat.update",
"version": "1",
"condition": {
"broadcaster_user_id": "1971641"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
}
}{
"subscription": {
"id": "5f65d0a7-0069-4f2b-944b-bc81b160ae49",
"status": "enabled",
"type": "channel.shared_chat.update",
"version": "1",
"condition": {
"broadcaster_user_id": "1971641"
},
"transport": {
"method": "websocket",
"session_id": "AgoQOtgGkFvXRlSkij343CndhIGY2VsbC1h"
},
"created_at": "2023-10-06T18:04:38.807682738Z",
"cost": 0
},
"event": {
"session_id": "2b64a92a-dbb8-424e-b1c3-304423ba1b6f",
"broadcaster_user_id": "1971641",
"broadcaster_user_login": "streamer",
"broadcaster_user_name": "streamer",
"host_broadcaster_user_id": "1971641",
"host_broadcaster_user_login": "streamer",
"host_broadcaster_user_name": "streamer",
"participants": [
{
"broadcaster_user_id": "1971641",
"broadcaster_user_name": "streamer",
"broadcaster_user_login": "streamer"
},
{
"broadcaster_user_id": "112233",
"broadcaster_user_name": "streamer33",
"broadcaster_user_login": "streamer33"
},
{
"broadcaster_user_id": "332211",
"broadcaster_user_name": "streamer11",
"broadcaster_user_login": "streamer11"
}
]
}
}