TwurpleAuthenticationGetting dataExamplesFAQMigration

Main classes

HelixEventSubApi

The API methods that deal with EventSub.

Overview

Methods

Can be accessed using client.eventSub on an ApiClient instance.

Before using these methods...

All methods in this class assume that you are already running a working EventSub listener reachable using the given transport.

If you don't already have one, we recommend use of the @twurple/eventsub-http or @twurple/eventsub-ws libraries, which handle subscribing and unsubscribing to these topics automatically.

Example

const api = new ApiClient({ authProvider });
await api.eventSub.subscribeToUserFollowsTo('125328655', { callbackUrl: 'https://example.com' });

Methods

createConduit(shardCount)

async

Creates a new EventSub conduit for the current client.

ParameterTypeRequiredDefaultDescription
shardCountnumbernone

The number of shards to create for this conduit.

createSubscription(type, version, condition, transport, user, requiredScopeSet, canOverrideScopedUserContext, isBatched)

async

Sends an arbitrary request to subscribe to an event.

You can only create WebHook transport subscriptions using app tokens and WebSocket transport subscriptions using user tokens.

ParameterTypeRequiredDefaultDescription
typestringnone

The type of the event.

versionstringnone

The version of the event.

conditionRecord<string, unknown>none

The condition of the subscription.

transportnone

The transport of the subscription.

user
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The user to create the subscription in context of.

requiredScopeSetstring[]none

The scope set required by the subscription. Will only be checked for applicable transports.

canOverrideScopedUserContextbooleannone

Whether the auth user context can be overridden.

isBatchedbooleannone

Whether to enable batching for the subscription. Is only supported for select topics.

deleteAllSubscriptions()

async

Deletes all subscriptions.

Return type: void

deleteBrokenSubscriptions()

async

Deletes all broken subscriptions, i.e. all that are not enabled or pending verification.

Return type: void

deleteConduit(id)

async

Deletes an EventSub conduit for the current client.

ParameterTypeRequiredDefaultDescription
idstringnone

The ID of the conduit to delete.

Return type: void

deleteSubscription(id)

async

Deletes a subscription.

ParameterTypeRequiredDefaultDescription
idstringnone

The ID of the subscription.

Return type: void

getConduits()

async

Gets the current EventSub conduits for the current client.

Return type: HelixEventSubConduit[]

getConduitShards(conduitId, status, pagination)

async

Gets the shards of an EventSub conduit for the current client.

ParameterTypeRequiredDefaultDescription
conduitIdstringnone

The ID of the conduit to get shards for.

status
HelixEventSubSubscriptionStatus

Aliased type: "enabled" | "webhook_callback_verification_pending" | "webhook_callback_verification_failed" | "notification_failures_exceeded" | "authorization_revoked" | "moderator_removed" | "user_removed" | "version_removed" | "beta_maintenance" | "websocket_disconnected" | "websocket_failed_ping_pong" | "websocket_received_inbound_traffic" | "websocket_connection_unused" | "websocket_internal_error" | "websocket_network_timeout" | "websocket_network_error" | "conduit_deleted"

none

The status of the shards to filter by.

paginationHelixPaginationnonenone
Return type: HelixPaginatedResponse<HelixEventSubConduitShard>

getConduitShardsPaginated(conduitId, status)

Creates a paginator for the shards of an EventSub conduit for the current client.

ParameterTypeRequiredDefaultDescription
conduitIdstringnone

The ID of the conduit to get shards for.

status
HelixEventSubSubscriptionStatus

Aliased type: "enabled" | "webhook_callback_verification_pending" | "webhook_callback_verification_failed" | "notification_failures_exceeded" | "authorization_revoked" | "moderator_removed" | "user_removed" | "version_removed" | "beta_maintenance" | "websocket_disconnected" | "websocket_failed_ping_pong" | "websocket_received_inbound_traffic" | "websocket_connection_unused" | "websocket_internal_error" | "websocket_network_timeout" | "websocket_network_error" | "conduit_deleted"

none

The status of the shards to filter by.

Return type: HelixPaginatedRequest<HelixEventSubConduitShardData, HelixEventSubConduitShard>

getSubscriptions(pagination)

async

Gets the current EventSub subscriptions for the current client.

ParameterTypeRequiredDefaultDescription
paginationHelixPaginationnonesee below
pagination.afterstringnone

A cursor to get the following page of.

pagination.beforestringnone

A cursor to get the previous page of.

pagination.limitnumbernone

The number of results per page.

getSubscriptionsForStatus(status, pagination)

async

Gets the current EventSub subscriptions with the given status for the current client.

ParameterTypeRequiredDefaultDescription
status
HelixEventSubSubscriptionStatus

Aliased type: "enabled" | "webhook_callback_verification_pending" | "webhook_callback_verification_failed" | "notification_failures_exceeded" | "authorization_revoked" | "moderator_removed" | "user_removed" | "version_removed" | "beta_maintenance" | "websocket_disconnected" | "websocket_failed_ping_pong" | "websocket_received_inbound_traffic" | "websocket_connection_unused" | "websocket_internal_error" | "websocket_network_timeout" | "websocket_network_error" | "conduit_deleted"

none

The status of the subscriptions to get.

paginationHelixPaginationnonesee below
pagination.afterstringnone

A cursor to get the following page of.

pagination.beforestringnone

A cursor to get the previous page of.

pagination.limitnumbernone

The number of results per page.

getSubscriptionsForStatusPaginated(status)

Creates a paginator for the current EventSub subscriptions with the given status for the current client.

ParameterTypeRequiredDefaultDescription
status
HelixEventSubSubscriptionStatus

Aliased type: "enabled" | "webhook_callback_verification_pending" | "webhook_callback_verification_failed" | "notification_failures_exceeded" | "authorization_revoked" | "moderator_removed" | "user_removed" | "version_removed" | "beta_maintenance" | "websocket_disconnected" | "websocket_failed_ping_pong" | "websocket_received_inbound_traffic" | "websocket_connection_unused" | "websocket_internal_error" | "websocket_network_timeout" | "websocket_network_error" | "conduit_deleted"

none

The status of the subscriptions to get.

getSubscriptionsForType(type, pagination)

async

Gets the current EventSub subscriptions with the given type for the current client.

ParameterTypeRequiredDefaultDescription
typestringnone

The type of the subscriptions to get.

paginationHelixPaginationnonesee below
pagination.afterstringnone

A cursor to get the following page of.

pagination.beforestringnone

A cursor to get the previous page of.

pagination.limitnumbernone

The number of results per page.

getSubscriptionsForTypePaginated(type)

Creates a paginator for the current EventSub subscriptions with the given type for the current client.

ParameterTypeRequiredDefaultDescription
typestringnone

The type of the subscriptions to get.

getSubscriptionsForUser(user, pagination)

async

Gets the current EventSub subscriptions for the current user and client.

ParameterTypeRequiredDefaultDescription
user
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The user to get subscriptions for.

paginationHelixPaginationnonesee below
pagination.afterstringnone

A cursor to get the following page of.

pagination.beforestringnone

A cursor to get the previous page of.

pagination.limitnumbernone

The number of results per page.

getSubscriptionsForUserPaginated(user)

Creates a paginator for the current EventSub subscriptions with the given type for the current client.

ParameterTypeRequiredDefaultDescription
user
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The user to get subscriptions for.

getSubscriptionsPaginated()

Creates a paginator for the current EventSub subscriptions for the current client.

subscribeToChannelAdBreakBeginEvents(broadcaster, transport)

async

Subscribe to events that represent an ad break beginning in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster for which you want to listen to ad break begin events.

transportnone

The transport options.

subscribeToChannelBanEvents(broadcaster, transport)

async

Subscribe to events that represent a user being banned in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to ban events for.

transportnone

The transport options.

subscribeToChannelCharityCampaignProgressEvents(broadcaster, transport)

async

Subscribe to events that represent a charity campaign progressing in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to charity donation events for.

transportnone

The transport options.

subscribeToChannelCharityCampaignStartEvents(broadcaster, transport)

async

Subscribe to events that represent a charity campaign starting in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to charity donation events for.

transportnone

The transport options.

subscribeToChannelCharityCampaignStopEvents(broadcaster, transport)

async

Subscribe to events that represent a charity campaign ending in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to charity donation events for.

transportnone

The transport options.

subscribeToChannelCharityDonationEvents(broadcaster, transport)

async

Subscribe to events that represent a user donating to a charity campaign in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to charity donation events for.

transportnone

The transport options.

subscribeToChannelChatClearEvents(broadcaster, transport)

async

Subscribe to events that represent a channel's chat being cleared.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster for which you want to listen to chat clear events.

transportnone

The transport options.

subscribeToChannelChatClearUserMessagesEvents(broadcaster, transport)

async

Subscribe to events that represent a user's chat messages being cleared in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster for which you want to listen to user chat message clear events.

transportnone

The transport options.

subscribeToChannelChatMessageDeleteEvents(broadcaster, transport)

async

Subscribe to events that represent a chat message being deleted in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster for which you want to listen to chat message delete events.

transportnone

The transport options.

subscribeToChannelChatMessageEvents(broadcaster, transport)

async

Subscribe to events that represent a chat message in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster for which you want to listen to chat message events.

transportnone

The transport options.

subscribeToChannelChatNotificationEvents(broadcaster, transport)

async

Subscribe to events that represent a chat notification in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster for which you want to listen to chat notification events.

transportnone

The transport options.

subscribeToChannelChatSettingsUpdateEvents(broadcaster, transport)

async

Subscribe to events that represent chat settings being updated in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster for which you want to listen to chat settings update events.

transportnone

The transport options.

subscribeToChannelCheerEvents(broadcaster, transport)

async

Subscribe to events that represent a user cheering bits to a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to cheer events for.

transportnone

The transport options.

subscribeToChannelFollowEvents(broadcaster, transport)

async

Subscribe to events that represent a user following a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to follow events for.

transportnone

The transport options.

subscribeToChannelGoalBeginEvents(broadcaster, transport)

async

Subscribe to events that represent the beginning of a creator goal event in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to goal begin events for.

transportnone

The transport options.

subscribeToChannelGoalEndEvents(broadcaster, transport)

async

Subscribe to events that represent the end of a creator goal event.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster for which you want to listen to goal end events.

transportnone

The transport options.

subscribeToChannelGoalProgressEvents(broadcaster, transport)

async

Subscribe to events that represent progress towards a creator goal.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster for which you want to listen to goal progress events.

transportnone

The transport options.

subscribeToChannelHypeTrainBeginEvents(broadcaster, transport)

async

Subscribe to events that represent the beginning of a Hype Train event in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to Hype train begin events for.

transportnone

The transport options.

subscribeToChannelHypeTrainEndEvents(broadcaster, transport)

async

Subscribe to events that represent the end of a Hype Train event.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster for which you want to listen to Hype Train end events.

transportnone

The transport options.

subscribeToChannelHypeTrainProgressEvents(broadcaster, transport)

async

Subscribe to events that represent progress towards the Hype Train goal.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster for which you want to listen to Hype Train progress events.

transportnone

The transport options.

subscribeToChannelModeratorAddEvents(broadcaster, transport)

async

Subscribe to events that represent a moderator being added to a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen for moderator add events for.

transportnone

The transport options.

subscribeToChannelModeratorRemoveEvents(broadcaster, transport)

async

Subscribe to events that represent a moderator being removed from a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen for moderator remove events for.

transportnone

The transport options.

subscribeToChannelPollBeginEvents(broadcaster, transport)

async

Subscribe to events that represent a poll starting in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to poll begin events for.

transportnone

The transport options.

subscribeToChannelPollEndEvents(broadcaster, transport)

async

Subscribe to events that represent a poll ending in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to poll end events for.

transportnone

The transport options.

subscribeToChannelPollProgressEvents(broadcaster, transport)

async

Subscribe to events that represent a poll being voted on in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to poll progress events for.

transportnone

The transport options.

subscribeToChannelPredictionBeginEvents(broadcaster, transport)

async

Subscribe to events that represent a prediction starting in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to prediction begin events for.

transportnone

The transport options.

subscribeToChannelPredictionEndEvents(broadcaster, transport)

async

Subscribe to events that represent a prediction ending in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to prediction end events for.

transportnone

The transport options.

subscribeToChannelPredictionLockEvents(broadcaster, transport)

async

Subscribe to events that represent a prediction being locked in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to prediction lock events for.

transportnone

The transport options.

subscribeToChannelPredictionProgressEvents(broadcaster, transport)

async

Subscribe to events that represent a prediction being voted on in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to prediction preogress events for.

transportnone

The transport options.

subscribeToChannelRaidEventsFrom(broadcaster, transport)

async

Subscribe to events that represent a broadcaster raiding another broadcaster.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to outgoing raid events for.

transportnone

The transport options.

subscribeToChannelRaidEventsTo(broadcaster, transport)

async

Subscribe to events that represent a broadcaster being raided by another broadcaster.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to incoming raid events for.

transportnone

The transport options.

subscribeToChannelRedemptionAddEvents(broadcaster, transport)

async

Subscribe to events that represent a Channel Points reward being redeemed.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to redemption events for.

transportnone

The transport options.

subscribeToChannelRedemptionAddEventsForReward(broadcaster, rewardId, transport)

async

Subscribe to events that represent a specific Channel Points reward being redeemed.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to redemption events for.

rewardIdstringnone

The ID of the reward you want to listen to redemption events for.

transportnone

The transport options.

subscribeToChannelRedemptionUpdateEvents(broadcaster, transport)

async

Subscribe to events that represent a Channel Points redemption being updated.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to redemption update events for.

transportnone

The transport options.

subscribeToChannelRedemptionUpdateEventsForReward(broadcaster, rewardId, transport)

async

Subscribe to events that represent a specific Channel Points reward's redemption being updated.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to redemption update events for.

rewardIdstringnone

The ID of the reward you want to listen to redemption updates for.

transportnone

The transport options.

subscribeToChannelRewardAddEvents(broadcaster, transport)

async

Subscribe to events that represent a Channel Points reward being added to a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to reward add events for.

transportnone

The transport options.

subscribeToChannelRewardRemoveEvents(broadcaster, transport)

async

Subscribe to events that represent a Channel Points reward being removed from a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to reward remove events for.

transportnone

The transport options.

subscribeToChannelRewardRemoveEventsForReward(broadcaster, rewardId, transport)

async

Subscribe to events that represent a specific Channel Points reward being removed from a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to reward remove events for.

rewardIdstringnone

The ID of the reward you want to listen to remove events for.

transportnone

The transport options.

subscribeToChannelRewardUpdateEvents(broadcaster, transport)

async

Subscribe to events that represent a Channel Points reward being updated in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to reward update events for.

transportnone

The transport options.

subscribeToChannelRewardUpdateEventsForReward(broadcaster, rewardId, transport)

async

Subscribe to events that represent a specific Channel Points reward being updated.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to reward update events for.

rewardIdstringnone

The ID of the reward you want to listen to update events for.

transportnone

The transport options.

subscribeToChannelShieldModeBeginEvents(broadcaster, transport)

async

Subscribe to events that represent Shield Mode being activated in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to Shield Mode activation events for.

transportnone

The transport options.

subscribeToChannelShieldModeEndEvents(broadcaster, transport)

async

Subscribe to events that represent Shield Mode being deactivated in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to Shield Mode deactivation events for.

transportnone

The transport options.

subscribeToChannelShoutoutCreateEvents(broadcaster, transport)

async

Subscribe to events that represent a broadcaster shouting out another broadcaster.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster for which you want to listen to outgoing shoutout events.

transportnone

The transport options.

subscribeToChannelShoutoutReceiveEvents(broadcaster, transport)

async

Subscribe to events that represent a broadcaster being shouting out by another broadcaster.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster for which you want to listen to incoming shoutout events.

transportnone

The transport options.

subscribeToChannelSubscriptionEndEvents(broadcaster, transport)

async

Subscribe to events that represent a user's subscription to a channel ending.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to subscription end events for.

transportnone

The transport options.

subscribeToChannelSubscriptionEvents(broadcaster, transport)

async

Subscribe to events that represent a user subscribing to a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to subscribe events for.

transportnone

The transport options.

subscribeToChannelSubscriptionGiftEvents(broadcaster, transport)

async

Subscribe to events that represent a user gifting another user a subscription to a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to subscription gift events for.

transportnone

The transport options.

subscribeToChannelSubscriptionMessageEvents(broadcaster, transport)

async

Subscribe to events that represent a user's subscription to a channel being announced.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to subscription message events for.

transportnone

The transport options.

subscribeToChannelUnbanEvents(broadcaster, transport)

async

Subscribe to events that represent a user being unbanned in a channel.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to unban events for.

transportnone

The transport options.

subscribeToChannelUpdateEvents(broadcaster, transport)

async

Subscribe to events that represent a channel updating their metadata.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to update events for.

transportnone

The transport options.

subscribeToDropEntitlementGrantEvents(filter, transport)

async

Subscribe to events that represent a drop entitlement being granted.

ParameterTypeRequiredDefaultDescription
filterHelixEventSubDropEntitlementGrantFilternonesee below
filter.campaignIdstringnone

The ID of the campaign to get events for.

filter.categoryIdstringnone

The ID of the category/game to get events for.

filter.organizationIdstringnone

The ID of the organization that owns the categories/games to get events for.

transportnone

The transport options.

subscribeToExtensionBitsTransactionCreateEvents(clientId, transport)

async

Subscribe to events that represent an extension Bits transaction.

ParameterTypeRequiredDefaultDescription
clientIdstringnone

The Client ID for the extension you want to listen to Bits transactions for.

transportnone

The transport options.

subscribeToStreamOfflineEvents(broadcaster, transport)

async

Subscribe to events that represent a stream going offline.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to online events for.

transportnone

The transport options.

subscribeToStreamOnlineEvents(broadcaster, transport)

async

Subscribe to events that represent a stream going live.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster you want to listen to online events for.

transportnone

The transport options.

subscribeToUserAuthorizationGrantEvents(clientId, transport)

async

Subscribe to events that represent a user granting authorization to an application.

ParameterTypeRequiredDefaultDescription
clientIdstringnone

The Client ID for the application you want to listen to authorization grant events for.

transportnone

The transport options.

subscribeToUserAuthorizationRevokeEvents(clientId, transport)

async

Subscribe to events that represent a user revoking their authorization from an application.

ParameterTypeRequiredDefaultDescription
clientIdstringnone

The Client ID for the application you want to listen to authorization revoke events for.

transportnone

The transport options.

subscribeToUserUpdateEvents(user, transport, withEmail)

async

Subscribe to events that represent a user updating their account details.

ParameterTypeRequiredDefaultDescription
user
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The user you want to listen to user update events for.

transportnone

The transport options.

withEmailbooleannone

Whether to request adding the email address of the user to the notification.

Only has an effect with the websocket transport. With the webhook transport, this depends solely on the previous authorization given by the user.

updateConduit(id, shardCount)

async

Updates an EventSub conduit for the current client.

ParameterTypeRequiredDefaultDescription
idstringnone

The ID of the conduit to update.

shardCountnumbernone

The number of shards to update for this conduit.

updateConduitShards(conduitId, shards)

async

Updates shards of an EventSub conduit for the current client.

ParameterTypeRequiredDefaultDescription
conduitIdstringnone

The ID of the conduit to update shards for.

shardsHelixEventSubConduitShardsOptions[]none

List of shards to update