Hype Train Begin
The channel.hype_train.begin subscription type sends a notification when a Hype Train begins on the specified channel. The contributions that started the Hype Train are included in this notification's total, progress, and top_contributions; no channel.hype_train.progress notifications are sent for them. EventSub does not make strong assurances about the order of message delivery, so it is possible to receive channel.hype_train.progress notifications before you receive the corresponding channel.hype_train.begin notification.
After the Hype Train begins, new contributions to it cause channel.hype_train.progress notifications to be sent. Contributions made close together may be reported in a single notification. When the Hype Train is over, channel.hype_train.end is emitted.
For a shared Hype Train, each participating broadcaster that has Hype Trains enabled gets its own notification, with that broadcaster in broadcaster_user_id and the same id. A broadcaster whose channel joins a shared chat session while a shared Hype Train is in progress also gets this notification when the channel joins. In that case, started_at is when the shared Hype Train started, and level, total, and progress reflect the train's current state.
Subscription
- Type
channel.hype_train.begin- Version
2
Authorization
Requires one of the following:
- A user access token that includes the channel:read:hype_train scope.The User ID associated with the token must match the broadcaster_user_id in the event's condition.
- An app access token.The application, through prior authorization, must have been granted:
- The channel:read:hype_train scope for the user represented by the broadcaster_user_id event condition.
Subscription Request Body
typeStringRequiredThe subscription type name:channel.hype_train.begin.versionStringRequiredThe subscription type version:2.conditionObjectRequiredSubscription-specific parameters. Pass in the broadcaster user ID for the channel you want to Hype Train begin notifications for.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredThe ID of the broadcaster that you want to get Hype Train begin notifications for.
transportObjectRequiredTransport-specific parameters.Hide child attributesShow child attributes
transport.methodStringRequiredThe transport method for EventSub.Possible values
webhookwebsocketconduit
transport.callbackStringThe callback URL where notifications are sent. The URL must use the HTTPS protocol and port 443, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
NOTE: Redirects are not followed.
transport.secretStringThe secret used to verify the signature. The secret must be an ASCII string that's a minimum of 10 characters long and a maximum of 100 characters long. For information about how the secret is used, see Verifying the event message.
Required if method is webhook. Don't specify it for other methods.
transport.session_idStringAn ID that identifies the WebSocket to send notifications to. When you connect to EventSub using WebSockets, the server returns the ID in the Welcome message.
Required if method is websocket. Don't specify it for other methods.
transport.conduit_idStringAn ID that identifies the conduit to send this notification to. When you create a conduit, the server returns the ID in the API response.
Required if method is conduit. Don't specify it for other methods.
Event Payload
subscriptionObjectMetadata about the subscription.Hide child attributesShow child attributes
subscription.idStringThe Subscription ID of the subscription.subscription.typeStringThe notification's subscription type.subscription.versionStringThe version of the subscription.subscription.statusStringThe status of the subscription.subscription.costIntegerHow much the subscription counts against your limit. See Subscription Limits for more information.subscription.conditionObjectSubscription-specific parameters.Hide child attributesShow child attributes
subscription.condition.broadcaster_user_idStringThe ID of the broadcaster that you want to get Hype Train begin notifications for.
subscription.created_atStringThe UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis conduit.
eventObjectThe event information.Hide child attributesShow child attributes
event.idStringThe Hype Train ID.event.broadcaster_user_idStringThe requested broadcaster ID.event.broadcaster_user_loginStringThe requested broadcaster login.event.broadcaster_user_nameStringThe requested broadcaster display name.event.totalIntegerTotal points contributed to the Hype Train.event.progressIntegerThe number of points contributed to the Hype Train at the current level.event.goalIntegerThe number of points required to reach the next level.event.top_contributionsObject[]For each contribution type used, the contributor with the most points, counting only the contributions that started the Hype Train. There is one entry per contribution type, in no particular order. For a shared Hype Train, only contributions made in this broadcaster's channel count, so the array may be empty.Hide child attributesShow child attributes
event.top_contributions.user_idStringThe ID of the user that made the contribution. If the contribution was anonymous, this is the ID of one of the Twitch accounts that stand in for anonymous contributors (one for anonymous cheers and one for anonymous gifted subscriptions), anduser_loginanduser_nameare that account's names.event.top_contributions.user_loginStringThe user's login name.event.top_contributions.user_nameStringThe user's display name.event.top_contributions.typeStringThe contribution method used.Possible values
bitsBits contributions with Cheering and Power-ups.subscriptionSubscription activity like subscribing or gifting subscriptions.otherCovers other contribution methods not listed.
event.top_contributions.totalIntegerThe total points the user contributed with this contribution type. Iftypeis bits,totalis the number of Bits used. Iftypeis subscription, each subscription (or each month of a multi-month gift) counts as 500, 1000, or 2500 points for a Tier 1, 2, or 3 subscription, andtotalis the sum for all of the user's subscriptions and gifted subscriptions. For example, five gifted Tier 1 subscriptions give atotalof 2500.
event.levelIntegerThe current level of the Hype Train.event.all_time_high_levelIntegerThe level of the highest-scoring earlier Hype Train on this broadcaster's channel that wasn't shared. For a shared Hype Train, the level of the highest-scoring earlier shared Hype Train that this broadcaster's channel contributed to. The level is based on that Hype Train's total points and this Hype Train's level goals. Is 1 if there's no such Hype Train.event.all_time_high_totalIntegerThe total points of the highest-scoring earlier Hype Train on this broadcaster's channel that wasn't shared. For a shared Hype Train, the total points of the highest-scoring earlier shared Hype Train that this broadcaster's channel contributed to. Is 0 if there's no such Hype Train.event.shared_train_participantsObject[]NullableNon-null for a shared Hype Train. The broadcasters whose channels have contributed to the shared Hype Train, in no particular order. When the Hype Train begins, only the channels where the contributions that started it were made are listed, so other participating broadcasters, including the one this notification is for, may be missing.Hide child attributesShow child attributes
event.shared_train_participants.broadcaster_user_idStringThe ID of the broadcaster participating in the shared Hype Train.event.shared_train_participants.broadcaster_user_loginStringThe login of the broadcaster participating in the shared Hype Train.event.shared_train_participants.broadcaster_user_nameStringThe display name of the broadcaster participating in the shared Hype Train.
event.started_atStringThe time when the Hype Train started.event.expires_atStringThe time when the Hype Train expires. The expiration is extended when the Hype Train reaches a new level.event.typeStringThe type of the Hype Train.Possible values
treasuregolden_kappamythicregular
event.is_shared_trainBooleanIndicates if the Hype Train is shared. When true,shared_train_participantslists the broadcasters whose channels have contributed to it.
{
"type": "channel.hype_train.begin",
"version": "2",
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"type": "channel.hype_train.begin",
"version": "2",
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "websocket",
"session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB"
}
}{
"type": "channel.hype_train.begin",
"version": "2",
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
}
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "channel.hype_train.begin",
"version": "2",
"status": "enabled",
"cost": 0,
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
},
"created_at": "2019-11-16T10:11:12.634234626Z"
},
"event": {
"id": "1b0f8c2e-3d4a-4f6b-9c7d-2e5a8b1c4d3f",
"broadcaster_user_id": "1337",
"broadcaster_user_login": "cool_user",
"broadcaster_user_name": "Cool_User",
"total": 137,
"progress": 137,
"goal": 500,
"top_contributions": [
{
"user_id": "123",
"user_login": "pogchamp",
"user_name": "PogChamp",
"type": "bits",
"total": 50
}
],
"shared_train_participants": null,
"level": 1,
"started_at": "2020-07-15T17:16:03.17106713Z",
"expires_at": "2020-07-15T17:21:03.17106713Z",
"is_shared_train": false,
"type": "regular",
"all_time_high_level": 4,
"all_time_high_total": 2845
}
}Hype Train End
The channel.hype_train.end subscription type sends a notification when a Hype Train ends on the specified channel.
Subscription
- Type
channel.hype_train.end- Version
2
Authorization
Requires one of the following:
- A user access token that includes the channel:read:hype_train scope.The User ID associated with the token must match the broadcaster_user_id in the event's condition.
- An app access token.The application, through prior authorization, must have been granted:
- The channel:read:hype_train scope for the user represented by the broadcaster_user_id event condition.
Subscription Request Body
typeStringRequiredThe subscription type name:channel.hype_train.end.versionStringRequiredThe subscription type version:2.conditionObjectRequiredSubscription-specific parameters. Pass in the broadcaster user ID for the channel you want to Hype Train end notifications for.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredThe ID of the broadcaster that you want to get Hype Train end notifications for.
transportObjectRequiredTransport-specific parameters.Hide child attributesShow child attributes
transport.methodStringRequiredThe transport method for EventSub.Possible values
webhookwebsocketconduit
transport.callbackStringThe callback URL where notifications are sent. The URL must use the HTTPS protocol and port 443, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
NOTE: Redirects are not followed.
transport.secretStringThe secret used to verify the signature. The secret must be an ASCII string that's a minimum of 10 characters long and a maximum of 100 characters long. For information about how the secret is used, see Verifying the event message.
Required if method is webhook. Don't specify it for other methods.
transport.session_idStringAn ID that identifies the WebSocket to send notifications to. When you connect to EventSub using WebSockets, the server returns the ID in the Welcome message.
Required if method is websocket. Don't specify it for other methods.
transport.conduit_idStringAn ID that identifies the conduit to send this notification to. When you create a conduit, the server returns the ID in the API response.
Required if method is conduit. Don't specify it for other methods.
Event Payload
subscriptionObjectMetadata about the subscription.Hide child attributesShow child attributes
subscription.idStringThe Subscription ID of the subscription.subscription.typeStringThe notification's subscription type.subscription.versionStringThe version of the subscription.subscription.statusStringThe status of the subscription.subscription.costIntegerHow much the subscription counts against your limit. See Subscription Limits for more information.subscription.conditionObjectSubscription-specific parameters.Hide child attributesShow child attributes
subscription.condition.broadcaster_user_idStringThe ID of the broadcaster that you want to get Hype Train end notifications for.
subscription.created_atStringThe UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis conduit.
eventObjectThe event information.Hide child attributesShow child attributes
event.idStringThe Hype Train ID.event.broadcaster_user_idStringThe requested broadcaster ID.event.broadcaster_user_loginStringThe requested broadcaster login.event.broadcaster_user_nameStringThe requested broadcaster display name.event.totalIntegerTotal points contributed to the Hype Train.event.top_contributionsObject[]The top contributor for each contribution type, with at most one bits entry and one subscription entry. The top contributor of a type is the user who used the most Bits, or who bought or gifted the most subscriptions whatever their tier. Anonymous contributions aren't listed, so the array may be empty. For a shared Hype Train, the array is computed separately for each broadcaster, so it can differ between their notifications.Hide child attributesShow child attributes
event.top_contributions.user_idStringThe ID of the user that made the contribution.event.top_contributions.user_loginStringThe user's login name.event.top_contributions.user_nameStringThe user's display name.event.top_contributions.typeStringThe contribution method used.Possible values
bitsBits contributions with Cheering, Power-ups, and Extensions.subscriptionSubscription activity like subscribing or gifting subscriptions.
event.top_contributions.totalIntegerThe total points the user contributed with this contribution type. Iftypeis bits,totalis the number of Bits used. Iftypeis subscription, each subscription (or each month of a multi-month gift) counts as 500, 1000, or 2500 points for a Tier 1, 2, or 3 subscription, andtotalis the sum for all of the user's subscriptions and gifted subscriptions. For example, five gifted Tier 1 subscriptions give atotalof 2500.
event.levelIntegerThe current level of the Hype Train.event.shared_train_participantsObject[]NullableNon-null for a shared Hype Train. The broadcasters whose channels have contributed to the shared Hype Train, in no particular order, including broadcasters who have since left the shared chat. A broadcaster in the shared chat whose channel hasn't had any contributions isn't listed, even in that broadcaster's own notification.Hide child attributesShow child attributes
event.shared_train_participants.broadcaster_user_idStringThe ID of the broadcaster participating in the shared Hype Train.event.shared_train_participants.broadcaster_user_loginStringThe login of the broadcaster participating in the shared Hype Train.event.shared_train_participants.broadcaster_user_nameStringThe display name of the broadcaster participating in the shared Hype Train.
event.started_atStringThe time when the Hype Train started.event.cooldown_ends_atStringThe time when the Hype Train cooldown ends so that the next Hype Train can start.event.ended_atStringThe time when the Hype Train ended.event.typeStringThe type of the Hype Train.Possible values
treasuregolden_kappamythicregular
event.is_shared_trainBooleanIndicates if the Hype Train is shared. When true,shared_train_participantslists the broadcasters whose channels have contributed to it.
{
"type": "channel.hype_train.end",
"version": "2",
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"type": "channel.hype_train.end",
"version": "2",
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "websocket",
"session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB"
}
}{
"type": "channel.hype_train.end",
"version": "2",
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
}
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "channel.hype_train.end",
"version": "2",
"status": "enabled",
"cost": 0,
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
},
"created_at": "2019-11-16T10:11:12.634234626Z"
},
"event": {
"id": "1b0f8c2e-3d4a-4f6b-9c7d-2e5a8b1c4d3f",
"broadcaster_user_id": "1337",
"broadcaster_user_login": "cool_user",
"broadcaster_user_name": "Cool_User",
"total": 137,
"top_contributions": [
{
"user_id": "123",
"user_login": "pogchamp",
"user_name": "PogChamp",
"type": "bits",
"total": 50
}
],
"shared_train_participants": null,
"level": 1,
"started_at": "2020-07-15T17:16:03.17106713Z",
"ended_at": "2020-07-15T17:21:03.17106713Z",
"cooldown_ends_at": "2020-07-15T19:21:03.17106713Z",
"is_shared_train": false,
"type": "regular"
}
}Hype Train Progress
The channel.hype_train.progress subscription type sends a notification when a Hype Train makes progress on the specified channel. channel.hype_train.progress notifications are sent periodically while a Hype Train is making progress. EventSub does not make strong assurances about the order of message delivery, so it is possible to receive channel.hype_train.progress before you receive the corresponding channel.hype_train.begin.
When the Hype Train is over, channel.hype_train.end is emitted.
Subscription
- Type
channel.hype_train.progress- Version
2
Authorization
Requires one of the following:
- A user access token that includes the channel:read:hype_train scope.The User ID associated with the token must match the broadcaster_user_id in the event's condition.
- An app access token.The application, through prior authorization, must have been granted:
- The channel:read:hype_train scope for the user represented by the broadcaster_user_id event condition.
Subscription Request Body
typeStringRequiredThe subscription type name:channel.hype_train.progress.versionStringRequiredThe subscription type version:2.conditionObjectRequiredSubscription-specific parameters. Pass in the broadcaster user ID for the channel you want to Hype Train progress notifications for.Hide child attributesShow child attributes
condition.broadcaster_user_idStringRequiredThe ID of the broadcaster that you want to get Hype Train progress notifications for.
transportObjectRequiredTransport-specific parameters.Hide child attributesShow child attributes
transport.methodStringRequiredThe transport method for EventSub.Possible values
webhookwebsocketconduit
transport.callbackStringThe callback URL where notifications are sent. The URL must use the HTTPS protocol and port 443, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
NOTE: Redirects are not followed.
transport.secretStringThe secret used to verify the signature. The secret must be an ASCII string that's a minimum of 10 characters long and a maximum of 100 characters long. For information about how the secret is used, see Verifying the event message.
Required if method is webhook. Don't specify it for other methods.
transport.session_idStringAn ID that identifies the WebSocket to send notifications to. When you connect to EventSub using WebSockets, the server returns the ID in the Welcome message.
Required if method is websocket. Don't specify it for other methods.
transport.conduit_idStringAn ID that identifies the conduit to send this notification to. When you create a conduit, the server returns the ID in the API response.
Required if method is conduit. Don't specify it for other methods.
Event Payload
subscriptionObjectMetadata about the subscription.Hide child attributesShow child attributes
subscription.idStringThe Subscription ID of the subscription.subscription.typeStringThe notification's subscription type.subscription.versionStringThe version of the subscription.subscription.statusStringThe status of the subscription.subscription.costIntegerHow much the subscription counts against your limit. See Subscription Limits for more information.subscription.conditionObjectSubscription-specific parameters.Hide child attributesShow child attributes
subscription.condition.broadcaster_user_idStringThe ID of the broadcaster that you want to get Hype Train progress notifications for.
subscription.created_atStringThe UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis conduit.
eventObjectThe event information.Hide child attributesShow child attributes
event.idStringThe Hype Train ID.event.broadcaster_user_idStringThe requested broadcaster ID.event.broadcaster_user_loginStringThe requested broadcaster login.event.broadcaster_user_nameStringThe requested broadcaster display name.event.totalIntegerTotal points contributed to the Hype Train.event.progressIntegerThe number of points contributed to the Hype Train at the current level.event.goalIntegerThe number of points required to reach the next level.event.top_contributionsObject[]The top contributor for each contribution type, with at most one entry pertype. For example, the user who used the most Bits and the user who contributed the most subscriptions, counted by number of subscriptions regardless of tier. The array is empty until there's a top contributor, and the entries are in no particular order. Anonymous contributors are never listed. For a shared Hype Train, the array lists only the top contributors in this broadcaster's channel.Hide child attributesShow child attributes
event.top_contributions.user_idStringThe ID of the user that made the contribution.event.top_contributions.user_loginStringThe user's login name.event.top_contributions.user_nameStringThe user's display name.event.top_contributions.typeStringThe contribution method used.Possible values
bitsBits contributions with Cheering, Power-ups, and Extensions.subscriptionSubscription activity like subscribing or gifting subscriptions.
event.top_contributions.totalIntegerThe total points the user contributed with this contribution type. Iftypeis bits,totalis the number of Bits used. Iftypeis subscription, each subscription (or each month of a multi-month gift) counts as 500, 1000, or 2500 points for a Tier 1, 2, or 3 subscription, andtotalis the sum for all of the user's subscriptions and gifted subscriptions. For example, five gifted Tier 1 subscriptions give atotalof 2500.
event.levelIntegerThe current level of the Hype Train.event.shared_train_participantsObject[]NullableNon-null for a shared Hype Train. Lists the broadcasters whose channels have contributed to the shared Hype Train so far, in no particular order. A broadcaster in the shared chat whose channel hasn't had a contribution yet isn't listed.Hide child attributesShow child attributes
event.shared_train_participants.broadcaster_user_idStringThe ID of the broadcaster participating in the shared Hype Train.event.shared_train_participants.broadcaster_user_loginStringThe login of the broadcaster participating in the shared Hype Train.event.shared_train_participants.broadcaster_user_nameStringThe display name of the broadcaster participating in the shared Hype Train.
event.started_atStringThe time when the Hype Train started.event.expires_atStringThe time when the Hype Train expires. The expiration is extended when the Hype Train reaches a new level.event.typeStringThe type of the Hype Train.Possible values
treasuregolden_kappamythicregular
event.is_shared_trainBooleanIndicates if the Hype Train is shared. When true,shared_train_participantslists the broadcasters whose channels have contributed to the train.
{
"type": "channel.hype_train.progress",
"version": "2",
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
}
}{
"type": "channel.hype_train.progress",
"version": "2",
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "websocket",
"session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB"
}
}{
"type": "channel.hype_train.progress",
"version": "2",
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
}
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "channel.hype_train.progress",
"version": "2",
"status": "enabled",
"cost": 0,
"condition": {
"broadcaster_user_id": "1337"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
},
"created_at": "2019-11-16T10:11:12.634234626Z"
},
"event": {
"id": "1b0f8c2e-3d4a-4f6b-9c7d-2e5a8b1c4d3f",
"broadcaster_user_id": "1337",
"broadcaster_user_login": "cool_user",
"broadcaster_user_name": "Cool_User",
"total": 137,
"progress": 137,
"goal": 500,
"top_contributions": [
{
"user_id": "123",
"user_login": "pogchamp",
"user_name": "PogChamp",
"type": "bits",
"total": 50
}
],
"shared_train_participants": null,
"level": 1,
"started_at": "2020-07-15T17:16:03.17106713Z",
"expires_at": "2020-07-15T17:16:11.17106713Z",
"is_shared_train": false,
"type": "regular"
}
}