Channel Chat Settings Update
This event sends a notification when one of the following settings changes in the broadcaster's chat room: emote-only mode, followers-only mode or how long users must have followed, slow mode or its wait time, subscriber-only mode, or unique chat mode.
You receive one notification for each of these settings that changes, so an update that changes several of them at once sends several notifications. Each notification contains the current values of all of these settings, not only the setting that changed.
Notifications are not sent when only the non-moderator chat delay was changed, or when an update is performed that sets a setting to the value it already had.
If the user in user_id isn't already joined to the chat room, this subscription counts toward that user's chat join limits.
The user in user_id must be able to join the broadcaster's chat room. If that user is banned from the channel, or either account is suspended, the subscription request fails with 403 Forbidden, and an existing subscription is revoked.
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.The User ID associated with the token must match the user_id in the event's condition.
- 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.Not required if the user in user_id is the broadcaster or already has moderator status.
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, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is websocket. Don't specify it for other methods.
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.
Required if method is conduit. Don't specify it for other methods.
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 UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis 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 the broadcaster or one of their moderators clears all messages from the chat room. For example, they use the /clear command in chat, call Delete Chat Messages without message_id, or turn on Shield Mode with its clear chat setting enabled.
If the user in user_id isn't already joined to the chat room, this subscription counts toward that user's chat join limits.
The user in user_id must be able to join the broadcaster's chat room. If that user is banned from the channel, or either account is suspended, the subscription request fails with 403 Forbidden, and an existing subscription is revoked.
With an app access token, if the broadcaster hasn't granted channel:bot and the user in user_id is no longer one of the broadcaster's moderators, Twitch doesn't revoke the subscription right away. The next time the broadcaster's chat is cleared, Twitch revokes the subscription with status authorization_revoked (not moderator_removed) instead of sending the notification.
Subscription
- Type
channel.chat.clear- Version
1
Authorization
Requires one of the following:
- A user access token that includes the user:read:chat scope.The User ID associated with the token must match the user_id in the event's condition.
- 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.Not required if the user in user_id is the broadcaster or already has moderator status.
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, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is websocket. Don't specify it for other methods.
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.
Required if method is conduit. Don't specify it for other methods.
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 UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis 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 user is banned or put in a timeout, which clears all of that user's messages from chat.
If the user in user_id isn't already joined to the chat room, this subscription counts toward that user's chat join limits.
The user in user_id must be able to join the broadcaster's chat room. If that user is banned from the channel, or either account is suspended, the subscription request fails with 403 Forbidden, and an existing subscription is revoked. Putting that user in a timeout doesn't affect the subscription.
During a shared chat session, a ban or timeout in any channel in the session sends this notification for every channel in the session. In each notification, broadcaster_user_id is the channel the subscription is for, which may not be the channel where the user in target_user_id was banned or put in a timeout. The payload doesn't identify that channel.
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.The User ID associated with the token must match the user_id in the event's condition.
- 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.Not required if the user in user_id is the broadcaster or already has moderator status.
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, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is websocket. Don't specify it for other methods.
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.
Required if method is conduit. Don't specify it for other methods.
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 UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis 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.
If the user in user_id isn't already joined to the chat room, this subscription counts toward that user's chat join limits.
The subscription request fails with 403 Forbidden if the user in user_id is banned from the broadcaster's chat room, or if the user in user_id or the broadcaster is suspended. If the user in user_id is later banned from the chat room, the subscription is revoked with the status chat_user_banned.
Subscription
- Type
channel.chat.message- Version
1
Authorization
Requires one of the following:
- A user access token that includes the user:read:chat scope.The User ID associated with the token must match the user_id in the event's condition.
- 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.Not required if the user in user_id is the broadcaster or already has moderator status.
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, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is websocket. Don't specify it for other methods.
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.
Required if method is conduit. Don't specify it for other methods.
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 UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis 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. If the message was sent with the /me command, the text begins with\u0001ACTIONand ends with\u0001, andfragmentscontain only the message itself. If the message is a reply, the text andfragmentsbegin with @ and the display name of the parent message's sender (parent_user_name), followed by a space.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 minimum number of Bits for the Cheermote tier that the cheer reached. For example, if a Cheermote's tiers start at 1, 100, 1000, 5000 and 10000 Bits, cheer150 has atierof 100.
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. In a shared chat session, copies of the message delivered to other participants' channels always have text.Possible values
textchannel_points_highlightedchannel_points_sub_onlypower_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 badge, or an empty string if the badge has none. For example, the number of months the user has been subscribed for the subscriber and founder badges, the number of years for the user-anniversary badge, or the title of the outcome the user predicted for the predictions badge.
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.channel_points_animation_idStringNullableAn ID for the type of animation selected as part of a Power-ups message effect. Is null unlessmessage_typeis power_ups_message_effect.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 badge, or an empty string if the badge has none. For example, the number of months the user has been subscribed for the subscriber and founder badges, or the number of years for the user-anniversary badge. predictions badges aren't included insource_badges.
event.is_source_onlyBooleanNullableWhether a message sent during a shared chat session was sent only to the source channel. Can be true only in the source channel's own notification, where thesource_*fields are null. Copies delivered to the other channels in the session always have false. Is null if the message isn't 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,
"gif": 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,
"channel_points_animation_id": 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 Message Delete
The channel.chat.message_delete subscription type sends a notification when the broadcaster or a moderator removes a specific message from the chat room.
If the user in user_id isn't already joined to the chat room, this subscription counts toward that user's chat join limits.
The user in user_id must be able to join the broadcaster's chat room. If that user is banned from the channel, or either account is suspended, the subscription request fails with 403 Forbidden, and an existing subscription is revoked.
In a shared chat session, removing a message from the chat it was sent in also removes its copies from the other participating channels' chats. Each of those channels receives its own notification, with its own broadcaster_user_id, broadcaster_user_name and broadcaster_user_login, and the message_id of the copy in its chat. Removing a copy removes only that copy.
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.The User ID associated with the token must match the user_id in the event's condition.
- 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.Not required if the user in user_id is the broadcaster or already has moderator status.
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, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is websocket. Don't specify it for other methods.
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.
Required if method is conduit. Don't specify it for other methods.
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 UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis 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"
}
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "channel.chat.message_delete",
"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",
"message_id": "ab24e0b0-2260-4bac-94e4-05eedd4ecd0e"
}
}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.
If the user in user_id isn't already joined to the chat room, this subscription counts toward that user's chat join limits.
The subscription request fails with 403 Forbidden if the user in user_id is banned from the broadcaster's chat room, or if the user in user_id or the broadcaster is suspended. If the user in user_id is later banned from the chat room, the subscription is revoked with the status chat_user_banned.
Subscription
- Type
channel.chat.notification- Version
1
Authorization
Requires one of the following:
- A user access token that includes the user:read:chat scope.The User ID associated with the token must match the user_id in the event's condition.
- 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.Not required if the user in user_id is the broadcaster or already has moderator status.
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, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is websocket. Don't specify it for other methods.
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.
Required if method is conduit. Don't specify it for other methods.
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 UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis 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_idStringNullableThe user ID of the user that sent the message. Is null ifchatter_is_anonymousis true.event.chatter_user_nameStringNullableThe display name of the user that sent the message. Is null ifchatter_is_anonymousis true.event.chatter_user_loginStringNullableThe user login of the user that sent the message. Is null ifchatter_is_anonymousis true.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 broadcaster's channel. For a notice from another channel in a shared chat session,source_badgescontains the chatter's badges in that channel.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. Is an empty string for announcements; the announcement's text is inmessage.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
textemotemention
event.message.fragments.textStringMessage text in fragment.event.message.fragments.cheermoteObjectNullableAlways null. Notification messages don't contain Cheermotes.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_summaryunknownA notice type that this version of the subscription type doesn't describe. Every notice object is null.
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 number of consecutive months the user has been subscribed. Is null if the user chose not to share their streak.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_primeBooleanWhether 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 the gift was anonymous. Is null ifis_giftis false.event.resub.gifter_user_idStringNullableThe user ID of the subscription gifter. Is null ifis_giftis false or the gift was anonymous.event.resub.gifter_user_nameStringNullableThe user name of the subscription gifter. Is null ifis_giftis false or the gift was anonymous.event.resub.gifter_user_loginStringNullableThe user login of the subscription gifter. Is null ifis_giftis false or the gift was 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 number of gifts the gifter has given in this channel. Is null if the gifter is anonymous. Is 0 if the gifter chose not to share their gift count or the count isn't available.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 number of gifts the gifter has given in this channel. Is null if the gifter is anonymous. Is 0 if the gifter chose not to share their gift count or the count isn't available.
event.gift_paid_upgradeObjectNullableInformation about the gift paid upgrade event, where a user who received a gift subscription continues it as a paid subscription. 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.gift_paid_upgrade.gifter_user_loginStringNullableThe user login of the user who gifted the subscription. Null if anonymous.
event.prime_paid_upgradeObjectNullableInformation about the Prime paid upgrade event, where a user converts a Prime subscription to a paid subscription. Null ifnotice_typeis notprime_paid_upgrade.Hide 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.recipient_user_idStringNullableThe user ID of the user who received the chatter's gift subscription. Is null if the gift was paid forward to the community.event.pay_it_forward.recipient_user_nameStringNullableThe user name of the user who received the chatter's gift subscription. Is null if the gift was paid forward to the community.event.pay_it_forward.recipient_user_loginStringNullableThe user login of the user who received the chatter's gift subscription. Is null if the gift was paid forward to the community.event.pay_it_forward.gifter_is_anonymousBooleanWhether the user who originally gifted the chatter's subscription did so anonymously.event.pay_it_forward.gifter_user_idStringNullableThe user ID of the user who originally gifted the subscription that the chatter is paying forward. Is null if that gift was anonymous.event.pay_it_forward.gifter_user_nameStringNullableThe user name of the user who originally gifted the subscription that the chatter is paying forward. Is null if that gift was anonymous.event.pay_it_forward.gifter_user_loginStringNullableThe user login of the user who originally gifted the subscription that the chatter is paying forward. Is null if that gift was 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.colorStringThe color used to highlight the announcement. Is an empty string if the announcement was sent without a color.Possible values
PRIMARYThe default if a Send Chat Announcement request doesn't specify a color.BLUEGREENORANGEPURPLE
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 charity donation event. Null ifnotice_typeis notcharity_donation.Hide 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_placesIntegerThe 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 thesub_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_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_tier": "1000",
"is_prime": false,
"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,
"gifted_drops_summary": 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,
"shared_chat_gifted_drops_summary": 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.
If the user in user_id isn't already joined to the chat room, this subscription counts toward that user's chat join limits.
This notification isn't sent for every blocked message. No notification is sent when the message contains one of the channel's private blocked terms, or when the user's messages are restricted in the channel.
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.The User ID associated with the token must match the user_id in the event's condition.
- 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.Not required if the user in user_id is the broadcaster or already has moderator status.
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 ID of the user whose held messages you want to be notified about. Only messages that this user sends in the broadcaster's chat trigger a notification.
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, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is websocket. Don't specify it for other methods.
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.
Required if method is conduit. Don't specify it for other methods.
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 ID of the user whose held messages you want to be notified about. Only messages that this user sends in the broadcaster's chat trigger a notification.
subscription.created_atStringThe UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis 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
textcheermoteemotegif
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 minimum number of Bits for the Cheermote tier that the cheer reached. For example, if a Cheermote's tiers start at 1, 100, 1000, 5000 and 10000 Bits, cheer150 has atierof 100.
{
"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": "1337",
"broadcaster_user_login": "cool_user",
"broadcaster_user_name": "Cool_User",
"user_id": "9001",
"user_login": "cooler_user",
"user_name": "Cooler_User",
"message_id": "789",
"message": {
"text": "Kappa hi cheer100",
"fragments": [
{
"type": "emote",
"text": "Kappa",
"cheermote": null,
"emote": {
"id": "25",
"emote_set_id": "0"
}
},
{
"type": "text",
"text": " hi ",
"cheermote": null,
"emote": null
},
{
"type": "cheermote",
"text": "cheer100",
"cheermote": {
"prefix": "cheer",
"bits": 100,
"tier": 100
},
"emote": null
}
]
}
}
}Channel Chat User Message Update
The channel.chat.user_message_update subscription type notifies a user when a moderator approves or denies their message that AutoMod is holding for review. Messages held because they contain a private blocked term don't trigger notifications.
If the user in user_id isn't already joined to the chat room, this subscription counts toward that user's chat join limits.
The user in user_id must be able to join the broadcaster's chat room. If that user is banned from the channel, or either account is suspended, the subscription request fails with 403 Forbidden, and an existing subscription is revoked.
Twitch doesn't send a notification when a held message expires without a moderator acting on it. A moderator can still deny the message after it expires, but can't approve it.
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.The User ID associated with the token must match the user_id in the event's condition.
- 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.Not required if the user in user_id is the broadcaster or already has moderator status.
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, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is websocket. Don't specify it for other methods.
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.
Required if method is conduit. Don't specify it for other methods.
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 UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis 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. Mentions and links are sent as text fragments.Possible values
textcheermoteemotegif
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 minimum number of Bits for the Cheermote tier that the cheer reached. For example, if a Cheermote's tiers start at 1, 100, 1000, 5000 and 10000 Bits, cheer150 has atierof 100.
{
"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": "1337",
"broadcaster_user_login": "cool_user",
"broadcaster_user_name": "Cool_User",
"user_id": "9001",
"user_login": "cooler_user",
"user_name": "Cooler_User",
"status": "approved",
"message_id": "789",
"message": {
"text": "Kappa cheer100 surprise",
"fragments": [
{
"type": "emote",
"text": "Kappa",
"cheermote": null,
"emote": {
"id": "25",
"emote_set_id": "0"
}
},
{
"type": "text",
"text": " ",
"cheermote": null,
"emote": null
},
{
"type": "cheermote",
"text": "cheer100",
"cheermote": {
"prefix": "cheer",
"bits": 100,
"tier": 100
},
"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 the channel in the subscription condition becomes active in an active shared chat session: when the session it hosts starts, or when it joins a session, including the join that starts the session. Channels that are already active in the session aren't notified when another channel joins; they receive a channel.shared_chat.update notification instead.
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, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is websocket. Don't specify it for other methods.
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.
Required if method is conduit. Don't specify it for other methods.
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 UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis 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 channels that are active in the session, including the host and the channel in the subscription condition. Channels that were invited but haven't joined, or that left the session, aren't included.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": "2024-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 the channel in broadcaster_user_id stops being active in an active shared chat session, either because it left or was removed from the session, or because the session ended. When the session ends (for example, because the host left), every channel that was active in it receives this notification, the host included. Channels that were only invited don't receive it, and a session that ends before it becomes active sends no notifications.
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, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is websocket. Don't specify it for other methods.
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.
Required if method is conduit. Don't specify it for other methods.
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 UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis 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": "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"
}
}Channel Shared Chat Session Update
The channel.shared_chat.update subscription type sends a notification when another channel joins or leaves the active shared chat session the channel is in. Only channels that are active in the session both before and after the change receive it, including the host. The channel that joined receives channel.shared_chat.begin instead, and the channel that left receives channel.shared_chat.end. Changes that start or end the session, or that affect only invited channels that haven't joined, don't send this notification.
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, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is webhook. Don't specify it for other methods.
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.
Required if method is websocket. Don't specify it for other methods.
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.
Required if method is conduit. Don't specify it for other methods.
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 UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis 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 channels that are active in the session after the change, including the host and the channel in the subscription condition. Channels that were invited but haven't joined, or that left the session, aren't included. The payload doesn't say which channel joined or left.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"
}
]
}
}