Objects used by EventSub#

class twitchAPI.object.eventsub.ChannelPollBeginEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelUpdateEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelFollowEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelSubscribeEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelSubscriptionEndEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelSubscriptionGiftEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelSubscriptionMessageEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelCheerEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelRaidEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelBanEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelUnbanEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelModeratorAddEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelModeratorRemoveEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelPointsCustomRewardAddEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelPointsCustomRewardUpdateEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelPointsCustomRewardRemoveEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelPointsCustomRewardRedemptionAddEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelPointsCustomRewardRedemptionUpdateEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelPollProgressEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelPollEndEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelPredictionEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelPredictionEndEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.DropEntitlementGrantEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ExtensionBitsTransactionCreateEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.GoalEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.HypeTrainEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.HypeTrainEndEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.StreamOnlineEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.StreamOfflineEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.UserAuthorizationGrantEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.UserAuthorizationRevokeEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.UserUpdateEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ShieldModeEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.CharityCampaignStartEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.CharityCampaignProgressEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.CharityCampaignStopEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.CharityDonationEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelShoutoutCreateEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelShoutoutReceiveEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelChatClearEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelChatClearUserMessagesEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelChatMessageDeleteEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelChatNotificationEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelAdBreakBeginEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.ChannelChatMessageEvent#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

subscription:
Default:#
event:
Default:#
class twitchAPI.object.eventsub.Subscription#

Bases: TwitchObject

condition:
Default:#
cost:
Default:#
created_at:
Default:#
id:
Default:#
status:
Default:#
transport:
Default:#
type:
Default:#
version:
Default:#
__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelPollBeginData#

Bases: TwitchObject

id:
Default:#

ID of the poll

broadcaster_user_id:
Default:#

The requested broadcaster ID

broadcaster_user_login:
Default:#

The requested broadcaster login

broadcaster_user_name:
Default:#

The requested broadcaster display name

title:
Default:#

Question displayed for the poll

choices:
Default:#

Array of choices for the poll

bits_voting:
Default:#

Not supported

channel_points_voting:
Default:#

The Channel Points voting settings for the Poll

started_at:
Default:#

The time the poll started

ends_at:
Default:#

The time the poll will end

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.PollChoice#

Bases: TwitchObject

id:
Default:#

ID for the choice

title:
Default:#

Text displayed for the choice

bits_votes:
Default:#

Not used; will be stet to 0

channel_points_votes:
Default:#

Number of votes received via Channel Points

votes:
Default:#

Total number of votes received for the choice across all methods of voting

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.BitsVoting#

Bases: TwitchObject

is_enabled:
Default:#

Not used; will be set to False

amount_per_vote:
Default:#

Not used; will be set to 0

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelPointsVoting#

Bases: TwitchObject

is_enabled:
Default:#

Indicates if Channel Points can be used for Voting

amount_per_vote:
Default:#

Number of Channel Points required to vote once with Channel Points

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelUpdateData#

Bases: TwitchObject

broadcaster_user_id:
Default:#

The broadcaster’s user ID

broadcaster_user_login:
Default:#

The broadcaster’s user login

broadcaster_user_name:
Default:#

The broadcaster’s user display name

title:
Default:#

The channel’s stream title

language:
Default:#

The channel’s broadcast language

category_id:
Default:#

The channel´s category ID

category_name:
Default:#

The category name

content_classification_labels:
Default:#

Array of classification label IDs currently applied to the Channel

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelFollowData#

Bases: TwitchObject

user_id:
Default:#

The user ID for the user now following the specified channel

user_login:
Default:#

The user login for the user now following the specified channel

user_name:
Default:#

The user display name for the user now following the specified channel

broadcaster_user_id:
Default:#

The requested broadcaster’s user ID

broadcaster_user_login:
Default:#

The requested broadcaster’s user login

broadcaster_user_name:
Default:#

The requested broadcaster’s user display name

followed_at:
Default:#

when the follow occured

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelSubscribeData#

Bases: TwitchObject

user_id:
Default:#

The user ID for the user who subscribed to the specified channel

user_login:
Default:#

The user login for the user who subscribed to the specified channel

user_name:
Default:#

The user display name for the user who subscribed to the specified channel

broadcaster_user_id:
Default:#

The requested broadcaster’s user ID

broadcaster_user_login:
Default:#

The requested broadcaster’s user login

broadcaster_user_name:
Default:#

The requested broadcaster’s user display name

tier:
Default:#

The tier of the subscription. Valid values are 1000, 2000, and 3000

is_gift:
Default:#

Whether the subscription is a gift

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelSubscriptionEndData#

Bases: TwitchObject

user_id:
Default:#

The user ID for the user whose subscription ended

user_login:
Default:#

The user login for the user whose subscription ended

user_name:
Default:#

The user display name for the user whose subscription ended

broadcaster_user_id:
Default:#

The requested broadcaster’s user ID

broadcaster_user_login:
Default:#

The requested broadcaster’s user login

broadcaster_user_name:
Default:#

The requested broadcaster’s user display name

tier:
Default:#

The tier of the subscription that ended. Valid values are 1000, 2000, and 3000

is_gift:
Default:#

Whether the subscription was a gift

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelSubscriptionGiftData#

Bases: TwitchObject

user_id:
Default:#

The user ID for the user who sent the subscription gift. None if it was an anonymous subscription gift.

user_login:
Default:#

The user login for the user who sent the subscription gift. None if it was an anonymous subscription gift.

user_name:
Default:#

The user display name for the user who sent the subscription gift. None if it was an anonymous subscription gift.

broadcaster_user_id:
Default:#

The requested broadcaster’s user ID

broadcaster_user_login:
Default:#

The requested broadcaster’s user login

broadcaster_user_name:
Default:#

The requested broadcaster’s user display name

total:
Default:#

The number of subscriptions in teh subscription gift

tier:
Default:#

The tier of the subscription that ended. Valid values are 1000, 2000, and 3000

cumulative_total:
Default:#

The number of subscriptions giftet by this user in teh channel. None for anonymous gifts or if the gifter has opted out of sharing this information

is_anonymous:
Default:#

Whether the subscription gift was anonymous

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelSubscriptionMessageData#

Bases: TwitchObject

user_id:
Default:#

The user ID for the user who sent a resubscription chat message

user_login:
Default:#

The user login for the user who sent a resubscription chat message

user_name:
Default:#

The user display name for the user who sent a resubscription chat message

broadcaster_user_id:
Default:#

The requested broadcaster’s user ID

broadcaster_user_login:
Default:#

The requested broadcaster’s user login

broadcaster_user_name:
Default:#

The requested broadcaster’s user display name

tier:
Default:#

The tier of the user´s subscription

message:
Default:#

An object that contains the resubscription message and emote information needed to recreate the message.

cumulative_months:
Default:#

The number of consecutive months the user’s current subscription has been active. None if the user has opted out of sharing this information.

duration_months:
Default:#

The month duration of the subscription

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.SubscriptionMessage#

Bases: TwitchObject

text:
Default:#

the text of the resubscription chat message

emotes:
Default:#

An array that includes the emote ID and start and end positions for where the emote appears in the text

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.Emote#

Bases: TwitchObject

begin:
Default:#

The index of where the Emote starts in the text

end:
Default:#

The index of where the Emote ends in the text

id:
Default:#

The emote ID

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelCheerData#

Bases: TwitchObject

is_anonymous:
Default:#

Whether the user cheered anonymously or not

user_id:
Default:#

The user ID for the user who cheered on the specified channel. None if is_anonymous is True.

user_login:
Default:#

The user login for the user who cheered on the specified channel. None if is_anonymous is True.

user_name:
Default:#

The user display name for the user who cheered on the specified channel. None if is_anonymous is True.

broadcaster_user_id:
Default:#

The requested broadcaster’s user ID

broadcaster_user_login:
Default:#

The requested broadcaster’s user login

broadcaster_user_name:
Default:#

The requested broadcaster’s user display name

message:
Default:#

The message sent with the cheer

bits:
Default:#

The number of bits cheered

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelRaidData#

Bases: TwitchObject

from_broadcaster_user_id:
Default:#

The broadcaster id that created the raid

from_broadcaster_user_login:
Default:#

The broadcaster login that created the raid

from_broadcaster_user_name:
Default:#

The broadcaster display name that created the raid

to_broadcaster_user_id:
Default:#

The broadcaster id that received the raid

to_broadcaster_user_login:
Default:#

The broadcaster login that received the raid

to_broadcaster_user_name:
Default:#

The broadcaster display name that received the raid

viewers:
Default:#

The number of viewers in the raid

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelBanData#

Bases: TwitchObject

user_id:
Default:#

The user ID for the user who was banned on the specified channel

user_login:
Default:#

The user login for the user who was banned on the specified channel

user_name:
Default:#

The user display name for the user who was banned on the specified channel

broadcaster_user_id:
Default:#

The requested broadcaster ID

broadcaster_user_login:
Default:#

The requested broadcaster login

broadcaster_user_name:
Default:#

The requested broadcaster display name

moderator_user_id:
Default:#

The user ID of the issuer of the ban

moderator_user_login:
Default:#

The user login of the issuer of the ban

moderator_user_name:
Default:#

The user display name of the issuer of the ban

reason:
Default:#

The reason behind the ban

banned_at:
Default:#

The timestamp of when the user was banned or put in a timeout

ends_at:
Default:#

The timestamp of when the timeout ends. None if the user was banned instead of put in a timeout.

is_permanent:
Default:#

Indicates whether the ban is permanent (True) or a timeout (False). If True, ends_at will be None.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelUnbanData#

Bases: TwitchObject

user_id:
Default:#

The user ID for the user who was unbanned on the specified channel

user_login:
Default:#

The user login for the user who was unbanned on the specified channel

user_name:
Default:#

The user display name for the user who was unbanned on the specified channel

broadcaster_user_id:
Default:#

The requested broadcaster ID

broadcaster_user_login:
Default:#

The requested broadcaster login

broadcaster_user_name:
Default:#

The requested broadcaster display name

moderator_user_id:
Default:#

The user ID of the issuer of the unban

moderator_user_login:
Default:#

The user login of the issuer of the unban

moderator_user_name:
Default:#

The user display name of the issuer of the unban

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelModeratorAddData#

Bases: TwitchObject

broadcaster_user_id:
Default:#

The requested broadcaster ID

broadcaster_user_login:
Default:#

The requested broadcaster login

broadcaster_user_name:
Default:#

The requested broadcaster display name

user_id:
Default:#

The user ID of the new moderator

user_login:
Default:#

The user login of the new moderator

user_name:
Default:#

The user display name of the new moderator

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelModeratorRemoveData#

Bases: TwitchObject

broadcaster_user_id:
Default:#

The requested broadcaster ID

broadcaster_user_login:
Default:#

The requested broadcaster login

broadcaster_user_name:
Default:#

The requested broadcaster display name

user_id:
Default:#

The user ID of the removed moderator

user_login:
Default:#

The user login of the removed moderator

user_name:
Default:#

The user display name of the removed moderator

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelPointsCustomRewardData#

Bases: TwitchObject

id:
Default:#

The reward identifier

broadcaster_user_id:
Default:#

The requested broadcaster ID

broadcaster_user_login:
Default:#

The requested broadcaster login

broadcaster_user_name:
Default:#

The requested broadcaster display name

is_enabled:
Default:#

Is the reward currently enabled. If False, the reward won’t show up to viewers.

is_paused:
Default:#

Is the reward currently paused. If True, viewers can’t redeem.

is_in_stock:
Default:#

Is the reward currently in stock. If False, viewers can’t redeem.

title:
Default:#

The reward title

cost:
Default:#

The reward cost

prompt:
Default:#

The reward description

is_user_input_required:
Default:#

Does the viewer need to enter information when redeeming the reward

should_redemptions_skip_request_queue:
Default:#

Should redemptions be set to fulfilled status immediately when redeemed and skip the request queue instead of the normal unfulfilled status.

max_per_stream:
Default:#

Whether a maximum per stream is enabled and what the maximum is

max_per_user_per_stream:
Default:#

Whether a maximum per user per stream is enabled and what the maximum is

background_color:
Default:#

Custom background color for the reward. Format: Hex with # prefix.

image:
Default:#

Set of custom images for the reward. None if no images have been uploaded

default_image:
Default:#

Set of default images for the reward

global_cooldown:
Default:#

Whether a cooldown is enabled and what the cooldown is in seconds

cooldown_expires_at:
Default:#

Timestamp of the cooldown expiration. None if the reward is not on cooldown.

redemptions_redeemed_current_stream:
Default:#

The number of redemptions redeemed during the current live stream. Counts against the max_per_stream limit. None if the broadcasters stream is not live or max_per_stream isn not enabled.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.GlobalCooldown#

Bases: TwitchObject

is_enabled:
Default:#

Is the setting enabled

seconds:
Default:#

The cooldown in seconds

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.Image#

Bases: TwitchObject

url_1x:
Default:#

URL for the image at 1x size

url_2x:
Default:#

URL for the image at 2x size

url_4x:
Default:#

URL for the image at 4x size

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.MaxPerStream#

Bases: TwitchObject

is_enabled:
Default:#

Is the setting enabled

value:
Default:#

The max per stream limit

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.MaxPerUserPerStream#

Bases: TwitchObject

is_enabled:
Default:#

Is the setting enabled

value:
Default:#

The max per user per stream limit

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelPointsCustomRewardRedemptionData#

Bases: TwitchObject

id:
Default:#

The redemption identifier

broadcaster_user_id:
Default:#

The requested broadcaster ID

broadcaster_user_login:
Default:#

The requested broadcaster login

broadcaster_user_name:
Default:#

The requested broadcaster display name

user_id:
Default:#

User ID of the user the redeemed the reward

user_login:
Default:#

Login of the user the redeemed the reward

user_name:
Default:#

Display name of the user the redeemed the reward

user_input:
Default:#

The user input provided. Empty if not provided.

status:
Default:#

Defaults to unfulfilled. Possible values are: unknown, unfulfilled, fulfilled and canceled

reward:
Default:#

Basic information about the reward that was redeemed, at the time it was redeemed

redeemed_at:
Default:#

Timestamp of when the reward was redeemed

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.Reward#

Bases: TwitchObject

id:
Default:#

The reward identifier

title:
Default:#

The reward name

cost:
Default:#

The reward cost

prompt:
Default:#

The reward description

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelPollProgressData#

Bases: TwitchObject

id:
Default:#

ID of the poll

broadcaster_user_id:
Default:#

The requested broadcaster ID

broadcaster_user_login:
Default:#

The requested broadcaster login

broadcaster_user_name:
Default:#

The requested broadcaster display name

title:
Default:#

Question displayed for the poll

choices:
Default:#

An array of choices for the poll. Includes vote counts.

bits_voting:
Default:#

not supported

channel_points_voting:
Default:#

The Channel Points voting settings for the poll

started_at:
Default:#

The time the poll started

ends_at:
Default:#

The time the poll will end

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelPollEndData#

Bases: TwitchObject

id:
Default:#

ID of the poll

broadcaster_user_id:
Default:#

The requested broadcaster ID

broadcaster_user_login:
Default:#

The requested broadcaster login

broadcaster_user_name:
Default:#

The requested broadcaster display name

title:
Default:#

Question displayed for the poll

choices:
Default:#

An array of choices for the poll. Includes vote counts.

bits_voting:
Default:#

not supported

channel_points_voting:
Default:#

The Channel Points voting settings for the poll

status:
Default:#

The status of the poll. Valid values are completed, archived and terminated.

started_at:
Default:#

The time the poll started

ends_at:
Default:#

The time the poll ended

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelPredictionData#

Bases: TwitchObject

id:
Default:#

Channel Points Prediction ID.

broadcaster_user_id:
Default:#

The requested broadcaster ID.

broadcaster_user_login:
Default:#

The requested broadcaster login.

broadcaster_user_name:
Default:#

The requested broadcaster display name.

title:
Default:#

Title for the Channel Points Prediction.

outcomes:
Default:#

An array of outcomes for the Channel Points Prediction.

started_at:
Default:#

The time the Channel Points Prediction started.

locks_at:
Default:#

The time the Channel Points Prediction will automatically lock.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.Outcome#

Bases: TwitchObject

id:
Default:#

The outcome ID.

title:
Default:#

The outcome title.

color:
Default:#

The color for the outcome. Valid values are pink and blue.

users:
Default:#

The number of users who used Channel Points on this outcome.

channel_points:
Default:#

The total number of Channel Points used on this outcome.

top_predictors:
Default:#

An array of users who used the most Channel Points on this outcome.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.TopPredictors#

Bases: TwitchObject

user_id:
Default:#

The ID of the user.

user_login:
Default:#

The login of the user.

user_name:
Default:#

The display name of the user.

channel_points_won:
Default:#

The number of Channel Points won. This value is always null in the event payload for Prediction progress and Prediction lock. This value is 0 if the outcome did not win or if the Prediction was canceled and Channel Points were refunded.

channel_points_used:
Default:#

The number of Channel Points used to participate in the Prediction.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ChannelPredictionEndData#

Bases: TwitchObject

id:
Default:#

Channel Points Prediction ID.

broadcaster_user_id:
Default:#

The requested broadcaster ID.

broadcaster_user_login:
Default:#

The requested broadcaster login.

broadcaster_user_name:
Default:#

The requested broadcaster display name.

title:
Default:#

Title for the Channel Points Prediction.

winning_outcome_id:
Default:#

ID of the winning outcome.

outcomes:
Default:#

An array of outcomes for the Channel Points Prediction. Includes top_predictors.

status:
Default:#

The status of the Channel Points Prediction. Valid values are resolved and canceled.

started_at:
Default:#

The time the Channel Points Prediction started.

ended_at:
Default:#

The time the Channel Points Prediction ended.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.DropEntitlementGrantData#

Bases: TwitchObject

id:
Default:#

Individual event ID, as assigned by EventSub. Use this for de-duplicating messages.

data:
Default:#

Entitlement object

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.Entitlement#

Bases: TwitchObject

organization_id:
Default:#

The ID of the organization that owns the game that has Drops enabled.

category_id:
Default:#

Twitch category ID of the game that was being played when this benefit was entitled.

category_name:
Default:#

The category name.

campaign_id:
Default:#

The campaign this entitlement is associated with.

user_id:
Default:#

Twitch user ID of the user who was granted the entitlement.

user_name:
Default:#

The user display name of the user who was granted the entitlement.

user_login:
Default:#

The user login of the user who was granted the entitlement.

entitlement_id:
Default:#

Unique identifier of the entitlement. Use this to de-duplicate entitlements.

benefit_id:
Default:#

Identifier of the Benefit.

created_at:
Default:#

UTC timestamp in ISO format when this entitlement was granted on Twitch.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.Product#

Bases: TwitchObject

name:
Default:#

Product name.

bits:
Default:#

Bits involved in the transaction.

sku:
Default:#

Unique identifier for the product acquired.

in_development:
Default:#

Flag indicating if the product is in development. If in_development is true, bits will be 0.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ExtensionBitsTransactionCreateData#

Bases: TwitchObject

extension_client_id:
Default:#

Client ID of the extension.

id:
Default:#

Transaction ID.

broadcaster_user_id:
Default:#

The transaction’s broadcaster ID.

broadcaster_user_login:
Default:#

The transaction’s broadcaster login.

broadcaster_user_name:
Default:#

The transaction’s broadcaster display name.

user_id:
Default:#

The transaction’s user ID.

user_login:
Default:#

The transaction’s user login.

user_name:
Default:#

The transaction’s user display name.

product:
Default:#

Additional extension product information.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.GoalData#

Bases: TwitchObject

id:
Default:#

An ID that identifies this event.

broadcaster_user_id:
Default:#

An ID that uniquely identifies the broadcaster.

broadcaster_user_name:
Default:#

The broadcaster’s display name.

broadcaster_user_login:
Default:#

The broadcaster’s user handle.

type:
Default:#

The type of goal. Possible values are:

  • follow — The goal is to increase followers.

  • subscription — The goal is to increase subscriptions. This type shows the net increase or decrease in tier points associated with the subscriptions.

  • subscription_count — The goal is to increase subscriptions. This type shows the net increase or decrease in the number of subscriptions.

  • new_subscription — The goal is to increase subscriptions. This type shows only the net increase in tier points associated with the subscriptions (it does not account for users that unsubscribed since the goal started).

  • new_subscription_count — The goal is to increase subscriptions. This type shows only the net increase in the number of subscriptions (it does not account for users that unsubscribed since the goal started).

description:
Default:#

A description of the goal, if specified. The description may contain a maximum of 40 characters.

is_achieved:
Default:#

A Boolean value that indicates whether the broadcaster achieved their goal. Is true if the goal was achieved; otherwise, false. Only the channel.goal.end event includes this field.

current_amount:
Default:#

The goals current value. The goals type determines how this value is increased or decreased

  • If type is follow, this field is set to the broadcaster’s current number of followers. This number increases with new followers and decreases when users unfollow the broadcaster.

  • If type is subscription, this field is increased and decreased by the points value associated with the subscription tier. For example, if a tier-two subscription is worth 2 points, this field is increased or decreased by 2, not 1.

  • If type is subscription_count, this field is increased by 1 for each new subscription and decreased by 1 for each user that unsubscribes.

  • If type is new_subscription, this field is increased by the points value associated with the subscription tier. For example, if a tier-two subscription is worth 2 points, this field is increased by 2, not 1.

  • If type is new_subscription_count, this field is increased by 1 for each new subscription.

target_amount:
Default:#

The goal’s target value. For example, if the broadcaster has 200 followers before creating the goal, and their goal is to double that number, this field is set to 400.

started_at:
Default:#

The timestamp which indicates when the broadcaster created the goal.

ended_at:
Default:#

The timestamp which indicates when the broadcaster ended the goal. Only the channel.goal.end event includes this field.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.TopContribution#

Bases: TwitchObject

user_id:
Default:#

The ID of the user that made the contribution.

user_login:
Default:#

The user’s login name.

user_name:
Default:#

The user’s display name.

type:
Default:#

The contribution method used. Possible values are:

  • bits — Cheering with Bits.

  • subscription — Subscription activity like subscribing or gifting subscriptions.

  • other — Covers other contribution methods not listed.

total:
Default:#

The total amount contributed. If type is bits, total represents the amount of Bits used. If type is subscription, total is 500, 1000, or 2500 to represent tier 1, 2, or 3 subscriptions, respectively.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.LastContribution#

Bases: TwitchObject

user_id:
Default:#

The ID of the user that made the contribution.

user_login:
Default:#

The user’s login name.

user_name:
Default:#

The user’s display name.

type:
Default:#

The contribution method used. Possible values are:

  • bits — Cheering with Bits.

  • subscription — Subscription activity like subscribing or gifting subscriptions.

  • other — Covers other contribution methods not listed.

total:
Default:#

The total amount contributed. If type is bits, total represents the amount of Bits used. If type is subscription, total is 500, 1000, or 2500 to represent tier 1, 2, or 3 subscriptions, respectively.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.HypeTrainData#

Bases: TwitchObject

id:
Default:#

The Hype Train ID.

broadcaster_user_id:
Default:#

The requested broadcaster ID.

broadcaster_user_login:
Default:#

The requested broadcaster login.

broadcaster_user_name:
Default:#

The requested broadcaster display name.

total:
Default:#

Total points contributed to the Hype Train.

progress:
Default:#

The number of points contributed to the Hype Train at the current level.

goal:
Default:#

The number of points required to reach the next level.

top_contributions:
Default:#

The contributors with the most points contributed.

last_contribution:
Default:#

The most recent contribution.

level:
Default:#

The starting level of the Hype Train.

started_at:
Default:#

The time when the Hype Train started.

expires_at:
Default:#

The time when the Hype Train expires. The expiration is extended when the Hype Train reaches a new level.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.HypeTrainEndData#

Bases: TwitchObject

id:
Default:#

The Hype Train ID.

broadcaster_user_id:
Default:#

The requested broadcaster ID.

broadcaster_user_login:
Default:#

The requested broadcaster login.

broadcaster_user_name:
Default:#

The requested broadcaster display name.

level:
Default:#

The final level of the Hype Train.

total:
Default:#

Total points contributed to the Hype Train.

top_contributions:
Default:#

The contributors with the most points contributed.

started_at:
Default:#

The time when the Hype Train started.

ended_at:
Default:#

The time when the Hype Train ended.

cooldown_ends_at:
Default:#

The time when the Hype Train cooldown ends so that the next Hype Train can start.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.StreamOnlineData#

Bases: TwitchObject

id:
Default:#

The id of the stream.

broadcaster_user_id:
Default:#

The broadcaster’s user id.

broadcaster_user_login:
Default:#

The broadcaster’s user login.

broadcaster_user_name:
Default:#

The broadcaster’s user display name.

type:
Default:#

The stream type. Valid values are: live, playlist, watch_party, premiere, rerun.

started_at:
Default:#

The timestamp at which the stream went online at.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.StreamOfflineData#

Bases: TwitchObject

broadcaster_user_id:
Default:#

The broadcaster’s user id.

broadcaster_user_login:
Default:#

The broadcaster’s user login.

broadcaster_user_name:
Default:#

The broadcaster’s user display name.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.UserAuthorizationGrantData#

Bases: TwitchObject

client_id:
Default:#

The client_id of the application that was granted user access.

user_id:
Default:#

The user id for the user who has granted authorization for your client id.

user_login:
Default:#

The user login for the user who has granted authorization for your client id.

user_name:
Default:#

The user display name for the user who has granted authorization for your client id.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.UserAuthorizationRevokeData#

Bases: TwitchObject

client_id:
Default:#

The client_id of the application with revoked user access.

user_id:
Default:#

The user id for the user who has revoked authorization for your client id.

user_login:
Default:#

The user login for the user who has revoked authorization for your client id. This is null if the user no longer exists.

user_name:
Default:#

The user display name for the user who has revoked authorization for your client id. This is null if the user no longer exists.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.UserUpdateData#

Bases: TwitchObject

user_id:
Default:#

The user’s user id.

user_login:
Default:#

The user’s user login.

user_name:
Default:#

The user’s user display name.

email:
Default:#

The user’s email address. The event includes the user’s email address only if the app used to request this event type includes the user:read:email scope for the user; otherwise, the field is set to an empty string. See Create EventSub Subscription.

email_verified:
Default:#

A Boolean value that determines whether Twitch has verified the user’s email address. Is true if Twitch has verified the email address; otherwise, false.

NOTE: Ignore this field if the email field contains an empty string.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.ShieldModeData#

Bases: TwitchObject

broadcaster_user_id:
Default:#

An ID that identifies the broadcaster whose Shield Mode status was updated.

broadcaster_user_login:
Default:#

The broadcaster’s login name.

broadcaster_user_name:
Default:#

The broadcaster’s display name.

moderator_user_id:
Default:#

An ID that identifies the moderator that updated the Shield Mode’s status. If the broadcaster updated the status, this ID will be the same as broadcaster_user_id.

moderator_user_login:
Default:#

The moderator’s login name.

moderator_user_name:
Default:#

The moderator’s display name.

started_at:
Default:#

The timestamp of when the moderator activated Shield Mode. The object includes this field only for channel.shield_mode.begin events.

ended_at:
Default:#

The timestamp of when the moderator deactivated Shield Mode. The object includes this field only for channel.shield_mode.end events.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.Amount#

Bases: TwitchObject

value:
Default:#

The 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.

decimal_places:
Default:#

The number of decimal places used by the currency. For example, USD uses two decimal places. Use this number to translate value from minor units to major units by using the formula:

value / 10^decimal_places

currency:
Default:#

The ISO-4217 three-letter currency code that identifies the type of currency in value.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.CharityCampaignStartData#

Bases: TwitchObject

id:
Default:#

An ID that identifies the charity campaign.

broadcaster_id:
Default:#

An ID that identifies the broadcaster that’s running the campaign.

broadcaster_login:
Default:#

The broadcaster’s login name.

broadcaster_name:
Default:#

The broadcaster’s display name.

charity_name:
Default:#

The charity’s name.

charity_description:
Default:#

A description of the charity.

A URL to an image of the charity’s logo. The image’s type is PNG and its size is 100px X 100px.

charity_website:
Default:#

A URL to the charity’s website.

current_amount:
Default:#

Contains the current amount of donations that the campaign has received.

target_amount:
Default:#

Contains the campaign’s target fundraising goal.

started_at:
Default:#

The timestamp of when the broadcaster started the campaign.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.CharityCampaignStopData#

Bases: TwitchObject

id:
Default:#

An ID that identifies the charity campaign.

broadcaster_id:
Default:#

An ID that identifies the broadcaster that ran the campaign.

broadcaster_login:
Default:#

The broadcaster’s login name.

broadcaster_name:
Default:#

The broadcaster’s display name.

charity_name:
Default:#

The charity’s name.

charity_description:
Default:#

A description of the charity.

A URL to an image of the charity’s logo. The image’s type is PNG and its size is 100px X 100px.

charity_website:
Default:#

A URL to the charity’s website.

current_amount:
Default:#

Contains the final amount of donations that the campaign received.

target_amount:
Default:#

Contains the campaign’s target fundraising goal.

stopped_at:
Default:#

The timestamp of when the broadcaster stopped the campaign.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.CharityCampaignProgressData#

Bases: TwitchObject

id:
Default:#

An ID that identifies the charity campaign.

broadcaster_id:
Default:#

An ID that identifies the broadcaster that’s running the campaign.

broadcaster_login:
Default:#

The broadcaster’s login name.

broadcaster_name:
Default:#

The broadcaster’s display name.

charity_name:
Default:#

The charity’s name.

charity_description:
Default:#

A description of the charity.

A URL to an image of the charity’s logo. The image’s type is PNG and its size is 100px X 100px.

charity_website:
Default:#

A URL to the charity’s website.

current_amount:
Default:#

Contains the current amount of donations that the campaign has received.

target_amount:
Default:#

Contains the campaign’s target fundraising goal.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.CharityDonationData#

Bases: TwitchObject

id:
Default:#

An ID that identifies the donation. The ID is unique across campaigns.

campaign_id:
Default:#

An ID that identifies the charity campaign.

broadcaster_id:
Default:#

An ID that identifies the broadcaster that’s running the campaign.

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

broadcaster_login:
Default:#

The broadcaster’s login name.

broadcaster_name:
Default:#

The broadcaster’s display name.

user_id:
Default:#

An ID that identifies the user that donated to the campaign.

user_login:
Default:#

The user’s login name.

user_name:
Default:#

The user’s display name.

charity_name:
Default:#

The charity’s name.

charity_description:
Default:#

A description of the charity.

A URL to an image of the charity’s logo. The image’s type is PNG and its size is 100px X 100px.

charity_website:
Default:#

A URL to the charity’s website.

amount:
Default:#

Contains the amount of money that the user donated.

class twitchAPI.object.eventsub.ChannelShoutoutCreateData#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

broadcaster_user_id:
Default:#

An ID that identifies the broadcaster that sent the Shoutout.

broadcaster_user_login:
Default:#

The broadcaster’s login name.

broadcaster_user_name:
Default:#

The broadcaster’s display name.

to_broadcaster_user_id:
Default:#

An ID that identifies the broadcaster that received the Shoutout.

to_broadcaster_user_login:
Default:#

The broadcaster’s login name.

to_broadcaster_user_name:
Default:#

The broadcaster’s display name.

moderator_user_id:
Default:#

An ID that identifies the moderator that sent the Shoutout. If the broadcaster sent the Shoutout, this ID is the same as the ID in broadcaster_user_id.

moderator_user_login:
Default:#

The moderator’s login name.

moderator_user_name:
Default:#

The moderator’s display name.

viewer_count:
Default:#

The number of users that were watching the broadcaster’s stream at the time of the Shoutout.

started_at:
Default:#

The timestamp of when the moderator sent the Shoutout.

cooldown_ends_at:
Default:#

The timestamp of when the broadcaster may send a Shoutout to a different broadcaster.

target_cooldown_ends_at:
Default:#

The timestamp of when the broadcaster may send another Shoutout to the broadcaster in to_broadcaster_user_id.

class twitchAPI.object.eventsub.ChannelShoutoutReceiveData#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

broadcaster_user_id:
Default:#

An ID that identifies the broadcaster that received the Shoutout.

broadcaster_user_login:
Default:#

The broadcaster’s login name.

broadcaster_user_name:
Default:#

The broadcaster’s display name.

from_broadcaster_user_id:
Default:#

An ID that identifies the broadcaster that sent the Shoutout.

from_broadcaster_user_login:
Default:#

The broadcaster’s login name.

from_broadcaster_user_name:
Default:#

The broadcaster’s display name.

viewer_count:
Default:#

The number of users that were watching the from-broadcaster’s stream at the time of the Shoutout.

started_at:
Default:#

The timestamp of when the moderator sent the Shoutout.

class twitchAPI.object.eventsub.ChannelChatClearData#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

broadcaster_user_id:
Default:#

The broadcaster user ID.

broadcaster_user_name:
Default:#

The broadcaster display name.

broadcaster_user_login:
Default:#

The broadcaster login.

class twitchAPI.object.eventsub.ChannelChatClearUserMessagesData#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

broadcaster_user_id:
Default:#

The broadcaster user ID.

broadcaster_user_name:
Default:#

The broadcaster display name.

broadcaster_user_login:
Default:#

The broadcaster login.

target_user_id:
Default:#

The ID of the user that was banned or put in a timeout. All of their messages are deleted.

target_user_name:
Default:#

The user name of the user that was banned or put in a timeout.

target_user_login:
Default:#

The user login of the user that was banned or put in a timeout.

class twitchAPI.object.eventsub.ChannelChatMessageDeleteData#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

broadcaster_user_id:
Default:#

The broadcaster user ID.

broadcaster_user_name:
Default:#

The broadcaster display name.

broadcaster_user_login:
Default:#

The broadcaster login.

target_user_id:
Default:#

The ID of the user whose message was deleted.

target_user_name:
Default:#

The user name of the user whose message was deleted.

target_user_login:
Default:#

The user login of the user whose message was deleted.

message_id:
Default:#

A UUID that identifies the message that was removed.

class twitchAPI.object.eventsub.Badge#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

set_id:
Default:#

An ID that identifies this set of chat badges. For example, Bits or Subscriber.

id:
Default:#

An 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.

info:
Default:#

Contains 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.

class twitchAPI.object.eventsub.MessageFragmentCheermote#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

prefix:
Default:#

The name portion of the Cheermote string that you use in chat to cheer Bits. 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.

bits:
Default:#

The amount of bits cheered.

tier:
Default:#

The tier level of the cheermote.

class twitchAPI.object.eventsub.MessageFragmentEmote#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

id:
Default:#

An ID that uniquely identifies this emote.

emote_set_id:
Default:#

An ID that identifies the emote set that the emote belongs to.

owner_id:
Default:#

The ID of the broadcaster who owns the emote.

format:
Default:#

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. The possible formats are:

  • animated — An animated GIF is available for this emote.

  • static — A static PNG file is available for this emote.

class twitchAPI.object.eventsub.MessageFragmentMention#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

user_id:
Default:#

The user ID of the mentioned user.

user_name:
Default:#

The user name of the mentioned user.

user_login:
Default:#

The user login of the mentioned user.

class twitchAPI.object.eventsub.MessageFragment#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

type:
Default:#

The type of message fragment. Possible values:

  • text

  • cheermote

  • emote

  • mention

text:
Default:#

Message text in fragment

cheermote:
Default:#

Metadata pertaining to the cheermote.

emote:
Default:#

Metadata pertaining to the emote.

mention:
Default:#

Metadata pertaining to the mention.

class twitchAPI.object.eventsub.Message#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

text:
Default:#

The chat message in plain text.

fragments:
Default:#

Ordered list of chat message fragments.

class twitchAPI.object.eventsub.AnnouncementNoticeMetadata#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

color:
Default:#

Color of the announcement.

class twitchAPI.object.eventsub.CharityDonationNoticeMetadata#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

charity_name:
Default:#

Name of the charity.

amount:
Default:#

An object that contains the amount of money that the user paid.

class twitchAPI.object.eventsub.BitsBadgeTierNoticeMetadata#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

tier:
Default:#

The tier of the Bits badge the user just earned. For example, 100, 1000, or 10000.

class twitchAPI.object.eventsub.SubNoticeMetadata#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

sub_tier:
Default:#

The type of subscription plan being used. Possible values are:

  • 1000 — First level of paid or Prime subscription

  • 2000 — Second level of paid subscription

  • 3000 — Third level of paid subscription

is_prime:
Default:#

Indicates if the subscription was obtained through Amazon Prime.

duration_months:
Default:#

The number of months the subscription is for.

class twitchAPI.object.eventsub.RaidNoticeMetadata#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

user_id:
Default:#

The user ID of the broadcaster raiding this channel.

user_name:
Default:#

The user name of the broadcaster raiding this channel.

user_login:
Default:#

The login name of the broadcaster raiding this channel.

viewer_count:
Default:#

The number of viewers raiding this channel from the broadcaster’s channel.

profile_image_url:
Default:#

Profile image URL of the broadcaster raiding this channel.

class twitchAPI.object.eventsub.ResubNoticeMetadata#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

cumulative_months:
Default:#

The total number of months the user has subscribed.

duration_months:
Default:#

The number of months the subscription is for.

streak_months:
Default:#

Optional. The number of consecutive months the user has subscribed.

sub_tier:
Default:#

The type of subscription plan being used. Possible values are:

  • 1000 — First level of paid or Prime subscription

  • 2000 — Second level of paid subscription

  • 3000 — Third level of paid subscription

is_prime:
Default:#

Indicates if the resub was obtained through Amazon Prime.

is_gift:
Default:#

Whether or not the resub was a result of a gift.

gifter_is_anonymous:
Default:#

Optional. Whether or not the gift was anonymous.

gifter_user_id:
Default:#

Optional. The user ID of the subscription gifter. None if anonymous.

gifter_user_name:
Default:#

Optional. The user name of the subscription gifter. None if anonymous.

gifter_user_login:
Default:#

Optional. The user login of the subscription gifter. None if anonymous.

class twitchAPI.object.eventsub.UnraidNoticeMetadata#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

class twitchAPI.object.eventsub.SubGiftNoticeMetadata#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

duration_months:
Default:#

The number of months the subscription is for.

cumulative_total:
Default:#

Optional. The amount of gifts the gifter has given in this channel. None if anonymous.

recipient_user_id:
Default:#

The user ID of the subscription gift recipient.

recipient_user_name:
Default:#

The user name of the subscription gift recipient.

recipient_user_login:
Default:#

The user login of the subscription gift recipient.

sub_tier:
Default:#

The type of subscription plan being used. Possible values are:

  • 1000 — First level of paid subscription

  • 2000 — Second level of paid subscription

  • 3000 — Third level of paid subscription

community_gift_id:
Default:#

Optional. The ID of the associated community gift. None if not associated with a community gift.

class twitchAPI.object.eventsub.CommunitySubGiftNoticeMetadata#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

id:
Default:#

The ID of the associated community gift.

total:
Default:#

Number of subscriptions being gifted.

sub_tier:
Default:#

The type of subscription plan being used. Possible values are:

  • 1000 — First level of paid subscription

  • 2000 — Second level of paid subscription

  • 3000 — Third level of paid subscription

cumulative_total:
Default:#

Optional. The amount of gifts the gifter has given in this channel. None if anonymous.

class twitchAPI.object.eventsub.GiftPaidUpgradeNoticeMetadata#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

gifter_is_anonymous:
Default:#

Whether the gift was given anonymously.

gifter_user_id:
Default:#

Optional. The user ID of the user who gifted the subscription. None if anonymous.

gifter_user_name:
Default:#

Optional. The user name of the user who gifted the subscription. None if anonymous.

gifter_user_login:
Default:#

Optional. The user login of the user who gifted the subscription. None if anonymous.

class twitchAPI.object.eventsub.PrimePaidUpgradeNoticeMetadata#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

sub_tier:
Default:#

The type of subscription plan being used. Possible values are:

  • 1000 — First level of paid subscription

  • 2000 — Second level of paid subscription

  • 3000 — Third level of paid subscription

class twitchAPI.object.eventsub.PayItForwardNoticeMetadata#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

gifter_is_anonymous:
Default:#

Whether the gift was given anonymously.

gifter_user_id:
Default:#

Optional. The user ID of the user who gifted the subscription. None if anonymous.

gifter_user_name:
Default:#

Optional. The user name of the user who gifted the subscription. None if anonymous.

gifter_user_login:
Default:#

Optional. The user login of the user who gifted the subscription. None if anonymous.

class twitchAPI.object.eventsub.ChannelChatNotificationData#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

broadcaster_user_id:
Default:#

The broadcaster user ID.

broadcaster_user_name:
Default:#

The broadcaster display name.

broadcaster_user_login:
Default:#

The broadcaster login.

chatter_user_id:
Default:#

The user ID of the user that sent the message.

chatter_user_name:
Default:#

The user name of the user that sent the message.

chatter_user_login:
Default:#

The user login of the user that sent the message.

chatter_is_anonymous:
Default:#

Whether or not the chatter is anonymous.

color:
Default:#

The color of the user’s name in the chat room.

badges:
Default:#

List of chat badges.

system_message:
Default:#

The message Twitch shows in the chat room for this notice.

message_id:
Default:#

A UUID that identifies the message.

message:
Default:#

The structured chat message

notice_type:
Default:#

The type of notice. Possible values are:

  • sub

  • resub

  • sub_gift

  • community_sub_gift

  • gift_paid_upgrade

  • prime_paid_upgrade

  • raid

  • unraid

  • pay_it_forward

  • announcement

  • bits_badge_tier

  • charity_donation

sub:
Default:#

Information about the sub event. None if notice_type is not sub.

resub:
Default:#

Information about the resub event. None if notice_type is not resub.

sub_gift:
Default:#

Information about the gift sub event. None if notice_type is not sub_gift.

community_sub_gift:
Default:#

Information about the community gift sub event. None if notice_type is not community_sub_gift.

gift_paid_upgrade:
Default:#

Information about the community gift paid upgrade event. None if notice_type is not gift_paid_upgrade.

prime_paid_upgrade:
Default:#

Information about the Prime gift paid upgrade event. None if notice_type is not prime_paid_upgrade.

raid:
Default:#

Information about the raid event. None if notice_type is not raid.

unraid:
Default:#

Returns an empty payload if notice_type is unraid, otherwise returns None.

pay_it_forward:
Default:#

Information about the pay it forward event. None if notice_type is not pay_it_forward.

announcement:
Default:#

Information about the announcement event. None if notice_type is not announcement

charity_donation:
Default:#

Information about the charity donation event. None if notice_type is not charity_donation.

bits_badge_tier:
Default:#

Information about the bits badge tier event. None if notice_type is not bits_badge_tier.

class twitchAPI.object.eventsub.ChannelAdBreakBeginData#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

duration_seconds:
Default:#

Length in seconds of the mid-roll ad break requested

started_at:
Default:#

The UTC timestamp of when the ad break began, in RFC3339 format. Note that there is potential delay between this event, when the streamer requested the ad break, and when the viewers will see ads.

is_automatic:
Default:#

Indicates if the ad was automatically scheduled via Ads Manager

broadcaster_user_id:
Default:#

The broadcaster’s user ID for the channel the ad was run on.

broadcaster_user_login:
Default:#

The broadcaster’s user login for the channel the ad was run on.

broadcaster_user_name:
Default:#

The broadcaster’s user display name for the channel the ad was run on.

requester_user_id:
Default:#

The ID of the user that requested the ad. For automatic ads, this will be the ID of the broadcaster.

requester_user_login:
Default:#

The login of the user that requested the ad.

requester_user_name:
Default:#

The display name of the user that requested the ad.

class twitchAPI.object.eventsub.ChannelChatMessageData#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

broadcaster_user_id:
Default:#

The broadcaster user ID.

broadcaster_user_name:
Default:#

The broadcaster display name.

broadcaster_user_login:
Default:#

The broadcaster login.

chatter_user_id:
Default:#

The user ID of the user that sent the message.

chatter_user_name:
Default:#

The user name of the user that sent the message.

chatter_user_login:
Default:#

The user login of the user that sent the message.

message_id:
Default:#

A UUID that identifies the message.

message:
Default:#

The structured chat message.

message_type:
Default:#

The type of message. Possible values:

  • text

  • channel_points_highlighted

  • channel_points_sub_only

  • user_intro

badges:
Default:#

List of chat badges.

cheer:
Default:#

Optional. Metadata if this message is a cheer.

color:
Default:#

The 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.

reply:
Default:#

Optional. Metadata if this message is a reply.

channel_points_custom_reward_id:
Default:#

Optional. The ID of a channel points custom reward that was redeemed.

class twitchAPI.object.eventsub.ChatMessage#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

text:
Default:#

The chat message in plain text.

fragments:
Default:#

Ordered list of chat message fragments.

class twitchAPI.object.eventsub.ChatMessageBadge#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

set_id:
Default:#

An ID that identifies this set of chat badges. For example, Bits or Subscriber.

id:
Default:#

An 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.

info:
Default:#

Contains 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.

class twitchAPI.object.eventsub.ChatMessageFragment#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

type:
Default:#

The type of message fragment. Possible values:

  • text

  • cheermote

  • emote

  • mention

text:
Default:#

Message text in fragment.

cheermote:
Default:#

Optional. Metadata pertaining to the cheermote.

emote:
Default:#

Optional. Metadata pertaining to the emote.

mention:
Default:#

Optional. Metadata pertaining to the mention.

class twitchAPI.object.eventsub.ChatMessageFragmentCheermoteMetadata#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

prefix:
Default:#

The name portion of the Cheermote string that you use in chat to cheer Bits. 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.

bits:
Default:#

The amount of bits cheered.

tier:
Default:#

The tier level of the cheermote.

class twitchAPI.object.eventsub.ChatMessageFragmentMentionMetadata#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

user_id:
Default:#

The user ID of the mentioned user.

user_name:
Default:#

The user name of the mentioned user.

user_login:
Default:#

The user login of the mentioned user.

class twitchAPI.object.eventsub.ChatMessageReplyMetadata#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

parent_message_id:
Default:#

An ID that uniquely identifies the parent message that this message is replying to.

parent_message_body:
Default:#

The message body of the parent message.

parent_user_id:
Default:#

User ID of the sender of the parent message.

parent_user_name:
Default:#

User name of the sender of the parent message.

parent_user_login:
Default:#

User login of the sender of the parent message.

thread_message_id:
Default:#

An ID that identifies the parent message of the reply thread.

thread_user_id:
Default:#

User ID of the sender of the thread’s parent message.

thread_user_name:
Default:#

User name of the sender of the thread’s parent message.

thread_user_login:
Default:#

User login of the sender of the thread’s parent message.

class twitchAPI.object.eventsub.ChatMessageCheerMetadata#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

bits:
Default:#

The amount of Bits the user cheered.

class twitchAPI.object.eventsub.ChatMessageFragmentEmoteMetadata#

Bases: TwitchObject

__init__(**kwargs)#
to_dict(include_none_values=False)#

build dict based on annotation types

Parameters:

include_none_values (

Default:) – if fields that have None values should be included in the dictionary

Return type:

Default:

id:
Default:#

An ID that uniquely identifies this emote.

emote_set_id:
Default:#

An ID that identifies the emote set that the emote belongs to.

owner_id:
Default:#

The ID of the broadcaster who owns the emote.

format:
Default:#

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. The possible formats are:

  • animated — An animated GIF is available for this emote.

  • static — A static PNG file is available for this emote.