Skip to content

Provider Twitch

Joprebond edited this page Sep 15, 2026 · 1 revision

Provider: TWITCH

Source: com.jopre.streamlink.provider.variables.TwitchVariableMap

See Provider Variable Mapping for the general, provider-based concept this page is an instance of (ProviderVariable, ProviderName, etc).

Events Supported by StreamLink

Every EventConfigType below is a Twitch EventSub-backed event — see Event Configs for the full deserialization details of each class.

Event Config Class event JSON Value EventConfigType
ChannelPointRedeemConfig channel_point_claim CHANNEL_POINT_CLAIM
ChannelFollowEventConfig channel_follow CHANNEL_FOLLOW
ChannelRaidEventConfig channel_raid CHANNEL_RAID
ChannelSubscribeEventConfig channel_subscription CHANNEL_SUBSCRIBE
ChannelChatConfig channel_chat CHANNEL_CHAT
ChannelBitsConfig channel_bits CHANNEL_BITS
ChannelHypeTrainBeginConfig hype_train_start CHANNEL_HYPE_START
ChannelHypeTrainProgressConfig hype_train_progress CHANNEL_HYPE_PROGRESS
ChannelHypeTrainEndConfig hype_train_end CHANNEL_HYPE_END
ChannelGiftSubConfig channel_subscription_gift CHANNEL_SUBSCRIPTION_GIFT

The Variable Map

twitchVariableMap (a Map<EventConfigType, List<ProviderVariable>>) assembles the final variable list for each event above by concatenating the shared lists below (METADATA_LIST + SUBSCRIPTION_LIST + BASE_EVENT_LIST) with that event's specific list.

Shared Variables

These variables are included for every event listed above.

METADATA_LIST

Twitch Variable StreamLink Variable Data Type
metadata.message_id metadata.message-id STRING
metadata.subscription_type metadata.subscription-type STRING

SUBSCRIPTION_LIST

Twitch Variable StreamLink Variable Data Type
subscription.type subscription.type STRING
subscription.transport.session_id subscription.session-id STRING

BASE_EVENT_LIST

Twitch Variable StreamLink Variable Data Type
metadata.message_id event.event-id STRING
event.broadcaster_user_id event.broadcast-user-id STRING
event.broadcaster_user_name event.broadcast-user-name (StreamLinkConstants.BROADCASTER_VARIABLE_NAME) STRING
event.user_login event.user-login STRING
event.user_name event.user-name STRING

Per-Event Variables

Each section below lists the event-specific variables from TwitchVariableMap. The full variable set delivered to a handler for that event is the shared lists above plus the table shown here.

Channel Point Redemption — EventConfigType.CHANNEL_POINT_CLAIM (channel_point_claim)

List: CHANNEL_POINT_CLAIM_LIST

Twitch Variable StreamLink Variable Data Type
event.reward.id pointredeem.reward-id STRING
event.reward.title pointredeem.reward-title STRING
event.reward.cost pointredeem.message-type STRING

Channel Follow — EventConfigType.CHANNEL_FOLLOW (channel_follow)

List: CHANNEL_FOLLOW_LIST

Twitch Variable StreamLink Variable Data Type
event.reward.id pointredeem.reward-id STRING

Channel Raid — EventConfigType.CHANNEL_RAID (channel_raid)

List: CHANNEL_RAID_LIST

Twitch Variable StreamLink Variable Data Type
event.from_broadcaster_user_id event.user-id STRING
event.from_broadcaster_user_name event.user-name STRING
event.from_broadcaster_user_id raid.from-user-id STRING
event.from_broadcaster_user_name raid.from-user-name STRING
event.from_broadcaster_user_id raid.to-user-id STRING
event.from_broadcaster_user_name raid.to-user-name STRING
event.viewers raid.viewers STRING

Channel Subscribe — EventConfigType.CHANNEL_SUBSCRIBE (channel_subscription)

List: CHANNEL_SUBSCRIBE_LIST

Twitch Variable StreamLink Variable Data Type
event.duration_months subscribe.duration-months STRING
event.streak_months subscribe.streak_months STRING
event.user_login subscribe.user-login STRING
event.user_name subscribe.user_name STRING
event.tier subscribe.tier STRING

Channel Chat — EventConfigType.CHANNEL_CHAT (channel_chat)

List: CHANNEL_CHAT_LIST

Twitch Variable StreamLink Variable Data Type
event.chatter_user_id event.user-id STRING
event.chatter_user_name event.user-name STRING
event.message_id event.message-id STRING
event.message.text event.message STRING

Channel Bits (Cheer) — EventConfigType.CHANNEL_BITS (channel_bits)

List: CHANNEL_BITS_LIST

Twitch Variable StreamLink Variable Data Type
event.is_anonymous event.is-anonymous STRING
event.message event.message STRING
event.bits event.bits INTEGER

Hype Train Begin — EventConfigType.CHANNEL_HYPE_START (hype_train_start)

List: CHANNEL_HYPE_TRAIN_START

Twitch Variable StreamLink Variable Data Type
event.level event.hype-train-level STRING
event.total event.hype-train-total STRING
event.progress event.hype-train-progress STRING
event.goal event.hype-train-goal STRING
event.is_golden_kappa_train event.hype-train-kappa STRING
event.started_at event.hype-train-started-at STRING
event.expires_at event.hype-train-expires-at STRING

Hype Train Progress — EventConfigType.CHANNEL_HYPE_PROGRESS (hype_train_progress)

List: CHANNEL_HYPE_TRAIN_PROGRESS

Twitch Variable StreamLink Variable Data Type
event.level event.hype-train-level STRING
event.total event.hype-train-total STRING
event.progress event.hype-train-progress STRING
event.goal event.hype-train-goal STRING
event.is_golden_kappa_train event.hype-train-kappa STRING
event.started_at event.hype-train-started-at STRING
event.expires_at event.hype-train-expires-at STRING

Hype Train End — EventConfigType.CHANNEL_HYPE_END (hype_train_end)

List: CHANNEL_HYPE_TRAIN_END

Twitch Variable StreamLink Variable Data Type
event.level event.hype-train-level STRING
event.total event.hype-train-total STRING
event.progress event.hype-train-progress STRING
event.goal event.hype-train-goal STRING
event.is_golden_kappa_train event.hype-train-kappa STRING
event.started_at event.hype-train-started-at STRING
event.cooldown_ends_at event.hype-train-cooldown-ends-at STRING

Channel Subscription Gift — EventConfigType.CHANNEL_SUBSCRIPTION_GIFT (channel_subscription_gift)

List: CHANNEL_SUBSCRIPTION_GIFT

Twitch Variable StreamLink Variable Data Type
event.total event.total-subscriptions-gifted STRING
event.tier event.subscription-tier STRING
event.cumulative_total event.cumulative-total-subscriptions STRING
event.is_anonymous is_anonymous STRING

Variable List Summary

Event (EventConfigType) Config Key Shared Lists Event-Specific List
CHANNEL_POINT_CLAIM channel_point_claim METADATA, SUBSCRIPTION, BASE_EVENT CHANNEL_POINT_CLAIM_LIST
CHANNEL_FOLLOW channel_follow METADATA, SUBSCRIPTION, BASE_EVENT CHANNEL_FOLLOW_LIST
CHANNEL_RAID channel_raid METADATA, SUBSCRIPTION, BASE_EVENT CHANNEL_RAID_LIST
CHANNEL_SUBSCRIBE channel_subscription METADATA, SUBSCRIPTION, BASE_EVENT CHANNEL_SUBSCRIBE_LIST
CHANNEL_CHAT channel_chat METADATA, SUBSCRIPTION, BASE_EVENT CHANNEL_CHAT_LIST
CHANNEL_BITS channel_bits METADATA, SUBSCRIPTION, BASE_EVENT CHANNEL_BITS_LIST
CHANNEL_HYPE_START hype_train_start METADATA, SUBSCRIPTION, BASE_EVENT CHANNEL_HYPE_TRAIN_START
CHANNEL_HYPE_PROGRESS hype_train_progress METADATA, SUBSCRIPTION, BASE_EVENT CHANNEL_HYPE_TRAIN_PROGRESS
CHANNEL_HYPE_END hype_train_end METADATA, SUBSCRIPTION, BASE_EVENT CHANNEL_HYPE_TRAIN_END
CHANNEL_SUBSCRIPTION_GIFT channel_subscription_gift METADATA, SUBSCRIPTION, BASE_EVENT CHANNEL_SUBSCRIPTION_GIFT

Notes / Known Oddities

These are called out as-is from the current source, in case they are unintentional and worth a follow-up fix rather than being treated as authoritative behavior:

  • CHANNEL_POINT_CLAIM_LIST: event.reward.cost is mapped to the StreamLink variable pointredeem.message-type, which reads like a copy/paste naming mismatch (a "cost" value landing in a "message-type" variable).
  • CHANNEL_FOLLOW_LIST: binds event.reward.id to pointredeem.reward-id, but Twitch's channel.follow EventSub payload has no reward object — this looks like a leftover copy from CHANNEL_POINT_CLAIM_LIST.
  • CHANNEL_RAID_LIST: every entry reads from event.from_broadcaster_user_id / event.from_broadcaster_user_name (the raiding channel), including the fields written to raid.to-user-id / raid.to-user-name, so those two variables end up holding the raider's identity rather than the raided channel's.

Clone this wiki locally