EventSub#

EventSub lets you listen for events that happen on Twitch.

All available EventSub clients runs in their own thread, calling the given callback function whenever an event happens.

Look at Available Topics and Callback Payloads to find the topics you are interested in.

Available Transports#

EventSub is available with different types of transports, used for different applications.

Transport Method

Use Case

Auth Type

EventSub Webhook

Server / Multi User

App Authentication

EventSub Websocket

Client / Single User

User Authentication

Available Topics and Callback Payloads#

List of available EventSub Topics.

The Callback Payload is the type of the parameter passed to the callback function you specified in listen_.

Topic

Subscription Function & Callback Payload

Description

Channel Update v1

Function: listen_channel_update()
Payload: ChannelUpdateEvent

A broadcaster updates their channel properties e.g., category, title, mature flag, broadcast, or language.

Channel Update v2

Function: listen_channel_update_v2()
Payload: ChannelUpdateEvent

A broadcaster updates their channel properties e.g., category, title, content classification labels, broadcast, or language.

Channel Follow v2

Function: listen_channel_follow_v2()
Payload: ChannelFollowEvent

A specified channel receives a follow.

Channel Subscribe

Function: listen_channel_subscribe()
Payload: ChannelSubscribeEvent

A notification when a specified channel receives a subscriber. This does not include resubscribes.

Channel Subscription End

Function: listen_channel_subscription_end()
Payload: ChannelSubscriptionEndEvent

A notification when a subscription to the specified channel ends.

Channel Subscription Gift

Function: listen_channel_subscription_gift()
Payload: ChannelSubscriptionGiftEvent

A notification when a viewer gives a gift subscription to one or more users in the specified channel.

Channel Subscription Message

Function: listen_channel_subscription_message()
Payload: ChannelSubscriptionMessageEvent

A notification when a user sends a resubscription chat message in a specific channel.

Channel Cheer

Function: listen_channel_cheer()
Payload: ChannelCheerEvent

A user cheers on the specified channel.

Channel Raid

Function: listen_channel_raid()
Payload: ChannelRaidEvent

A broadcaster raids another broadcaster’s channel.

Channel Ban

Function: listen_channel_ban()
Payload: ChannelBanEvent

A viewer is banned from the specified channel.

Channel Unban

Function: listen_channel_unban()
Payload: ChannelUnbanEvent

A viewer is unbanned from the specified channel.

Channel Moderator Add

Function: listen_channel_moderator_add()
Payload: ChannelModeratorAddEvent

Moderator privileges were added to a user on a specified channel.

Channel Moderator Remove

Function: listen_channel_moderator_remove()
Payload: ChannelModeratorRemoveEvent

Moderator privileges were removed from a user on a specified channel.

Channel Points Custom Reward Add

Function: listen_channel_points_custom_reward_add()
Payload: ChannelPointsCustomRewardAddEvent

A custom channel points reward has been created for the specified channel.

Channel Points Custom Reward Update

Function: listen_channel_points_custom_reward_update()
Payload: ChannelPointsCustomRewardUpdateEvent

A custom channel points reward has been updated for the specified channel.

Channel Points Custom Reward Remove

Function: listen_channel_points_custom_reward_remove()
Payload: ChannelPointsCustomRewardRemoveEvent

A custom channel points reward has been removed from the specified channel.

Channel Points Custom Reward Redemption Add

Function: listen_channel_points_custom_reward_redemption_add()
Payload: ChannelPointsCustomRewardRedemptionAddEvent

A viewer has redeemed a custom channel points reward on the specified channel.

Channel Points Custom Reward Redemption Update

Function: listen_channel_points_custom_reward_redemption_update()
Payload: ChannelPointsCustomRewardRedemptionUpdateEvent

A redemption of a channel points custom reward has been updated for the specified channel.

Channel Poll Begin

Function: listen_channel_poll_begin()
Payload: ChannelPollBeginEvent

A poll started on a specified channel.

Channel Poll Progress

Function: listen_channel_poll_progress()
Payload: ChannelPollProgressEvent

Users respond to a poll on a specified channel.

Channel Poll End

Function: listen_channel_poll_end()
Payload: ChannelPollEndEvent

A poll ended on a specified channel.

Channel Prediction Begin

Function: listen_channel_prediction_begin()
Payload: ChannelPredictionEvent

A Prediction started on a specified channel.

Channel Prediction Progress

Function: listen_channel_prediction_progress()
Payload: ChannelPredictionEvent

Users participated in a Prediction on a specified channel.

Channel Prediction Lock

Function: listen_channel_prediction_lock()
Payload: ChannelPredictionEvent

A Prediction was locked on a specified channel.

Channel Prediction End

Function: listen_channel_prediction_end()
Payload: ChannelPredictionEndEvent

A Prediction ended on a specified channel.

Drop Entitlement Grant

Function: listen_drop_entitlement_grant()
Payload: DropEntitlementGrantEvent

An entitlement for a Drop is granted to a user.

Extension Bits Transaction Create

Function: listen_extension_bits_transaction_create()
Payload: ExtensionBitsTransactionCreateEvent

A Bits transaction occurred for a specified Twitch Extension.

Goal Begin

Function: listen_goal_begin()
Payload: GoalEvent

A goal begins on the specified channel.

Goal Progress

Function: listen_goal_progress()
Payload: GoalEvent

A goal makes progress on the specified channel.

Goal End

Function: listen_goal_end()
Payload: GoalEvent

A goal ends on the specified channel.

Hype Train Begin

Function: listen_hype_train_begin()
Payload: HypeTrainEvent

A Hype Train begins on the specified channel.

Hype Train Progress

Function: listen_hype_train_progress()
Payload: HypeTrainEvent

A Hype Train makes progress on the specified channel.

Hype Train End

Function: listen_hype_train_end()
Payload: HypeTrainEvent

A Hype Train ends on the specified channel.

Stream Online

Function: listen_stream_online()
Payload: StreamOnlineEvent

The specified broadcaster starts a stream.

Stream Offline

Function: listen_stream_offline()
Payload: StreamOfflineEvent

The specified broadcaster stops a stream.

User Authorization Grant

Function: listen_user_authorization_grant()
Payload: UserAuthorizationGrantEvent

A user’s authorization has been granted to your client id.

User Authorization Revoke

Function: listen_user_authorization_revoke()
Payload: UserAuthorizationRevokeEvent

A user’s authorization has been revoked for your client id.

User Update

Function: listen_user_update()
Payload: UserUpdateEvent

A user has updated their account.

Channel Shield Mode Begin

Function: listen_channel_shield_mode_begin()
Payload: ShieldModeEvent

Sends a notification when the broadcaster activates Shield Mode.

Channel Shield Mode End

Function: listen_channel_shield_mode_end()
Payload: ShieldModeEvent

Sends a notification when the broadcaster deactivates Shield Mode.

Channel Charity Campaign Start

Function: listen_channel_charity_campaign_start()
Payload: CharityCampaignStartEvent

Sends a notification when the broadcaster starts a charity campaign.

Channel Charity Campaign Progress

Function: listen_channel_charity_campaign_progress()
Payload: CharityCampaignProgressEvent

Sends notifications when progress is made towards the campaign’s goal or when the broadcaster changes the fundraising goal.

Channel Charity Campaign Stop

Function: listen_channel_charity_campaign_stop()
Payload: CharityCampaignStopEvent

Sends a notification when the broadcaster stops a charity campaign.

Channel Charity Campaign Donate

Function: listen_channel_charity_campaign_donate()
Payload: CharityDonationEvent

Sends a notification when a user donates to the broadcaster’s charity campaign.

Channel Shoutout Create

Function: listen_channel_shoutout_create()
Payload: ChannelShoutoutCreateEvent

Sends a notification when the specified broadcaster sends a Shoutout.

Channel Shoutout Receive

Function: listen_channel_shoutout_receive()
Payload: ChannelShoutoutReceiveEvent

Sends a notification when the specified broadcaster receives a Shoutout.

Channel Chat Clear

Function: listen_channel_chat_clear()
Payload: ChannelChatClearEvent

A moderator or bot has cleared all messages from the chat room.

Channel Chat Clear User Messages

Function: listen_channel_chat_clear_user_messages()
Payload: ChannelChatClearUserMessagesEvent

A moderator or bot has cleared all messages from a specific user.

Channel Chat Message Delete

Function: listen_channel_chat_message_delete()
Payload: ChannelChatMessageDeleteEvent

A moderator has removed a specific message.

Channel Chat Notification

Function: listen_channel_chat_notification()
Payload: ChannelChatNotificationEvent

A notification for when an event that appears in chat has occurred.

Channel Chat Message

Function: listen_channel_chat_message()
Payload: ChannelChatMessageEvent

Any user sends a message to a specific chat room.

Channel Ad Break Begin

Function: listen_channel_ad_break_begin()
Payload: ChannelAdBreakBeginEvent

A midroll commercial break has started running.