twitcheasy-twitch-bottwitch-authtwitch-auth-tmitwitch-chat-clienttwitch-eventsubtwitch-pubsub-clienttwitch-webhooks
Welcome

Classes

ApiClientBadgesApiBitsApiChannelChannelApiChannelFollowChannelPlaceholderChannelSubscriptionChatApiChatBadgeListChatBadgeSetChatBadgeVersionChatEmoteChatEmoteListChattersListCheermoteListConfigErrorCreatedVideoEmoteSetListHelixApiGroupHelixBanHelixBanEventHelixBitsApiHelixBitsLeaderboardHelixBitsLeaderboardEntryHelixChannelHelixChannelApiHelixChannelEditorHelixChannelEmoteHelixChannelPointsApiHelixChannelSearchResultHelixChatApiHelixChatBadgeSetHelixChatBadgeVersionHelixCheermoteListHelixClipHelixClipApiHelixCustomRewardHelixCustomRewardRedemptionHelixEmoteHelixEmoteFromSetHelixEventSubApiHelixEventSubSubscriptionHelixExtensionsApiHelixExtensionTransactionHelixFollowHelixGameHelixGameApiHelixHypeTrainApiHelixHypeTrainContributionHelixHypeTrainEventHelixInstalledExtensionHelixInstalledExtensionListHelixModerationApiHelixModeratorHelixModeratorEventHelixPaginatedRequestHelixPaginatedRequestWithTotalHelixPaginatedScheduleSegmentRequestHelixPollHelixPollApiHelixPollChoiceHelixPredictionHelixPredictionApiHelixPredictionOutcomeHelixPredictorHelixPrivilegedUserHelixScheduleHelixScheduleApiHelixScheduleSegmentHelixSearchApiHelixStreamHelixStreamApiHelixStreamMarkerHelixStreamMarkerWithVideoHelixSubscriptionHelixSubscriptionApiHelixSubscriptionEventHelixTagHelixTagApiHelixTeamHelixTeamApiHelixTeamWithUsersHelixUserHelixUserApiHelixUserBlockHelixUserExtensionHelixUserRelationHelixUserSubscriptionHelixVideoHelixVideoApiHelixWebHooksApiHelixWebHookSubscriptionKrakenApiGroupNoSubscriptionProgramErrorPrivilegedChannelPrivilegedUserSearchApiStreamStreamApiStreamNotLiveErrorSubscriptionTeamTeamApiTeamWithUsersUnsupportedApiUserUserApiUserBlockUserChatInfoUserFollowUserSubscriptionVideoVideoApi

HelixChannelPointsApi

The Helix API methods that deal with channel points.

Overview

Can be accessed using client.helix.channelPoints on an ApiClient instance.

Example

const api = new ApiClient(new StaticAuthProvider(clientId, accessToken));
const rewards = await api.helix.channelPoints.getCustomRewards('125328655');

Methods

createCustomReward(broadcaster, data)

async

Creates a new custom reward.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to create the reward for.

dataHelixCreateCustomRewardDatanone

The reward data.

data.autoFulfillbooleannone

Whether the redemption should automatically set its status to fulfilled.

data.backgroundColorstringnone

The hex code of the background color of the reward.

data.costnumbernone

The channel points cost of the reward.

data.globalCooldownnumber | nullnone

The cooldown between two redemptions of the reward, in seconds. 0 or null means no cooldown.

data.isEnabledbooleannone

Whether the reward is enabled (shown to users).

data.maxRedemptionsPerStreamnumber | nullnone

The maximum number of redemptions of the reward per stream. 0 or null means no limit.

data.maxRedemptionsPerUserPerStreamnumber | nullnone

The maximum number of redemptions of the reward per stream for each user. 0 or null means no limit.

data.promptstringnone

The prompt shown to users when redeeming the reward.

data.titlestringnone

The title of the reward.

data.userInputRequiredbooleannone

Whether the reward requires user input to be redeemed.

Return type: HelixCustomReward

deleteCustomReward(broadcaster, rewardId)

async

Deletes a custom reward.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to delete the reward for.

rewardIdstringnone

The ID of the reward.

Return type: void

getCustomRewardById(broadcaster, rewardId)

async

Retrieves a custom reward by ID.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to retrieve the reward for.

rewardIdstringnone

The ID of the reward.

Return type: HelixCustomReward | null

getCustomRewards(broadcaster, onlyManageable)

async

Retrieves all custom rewards for the given broadcaster.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to retrieve the rewards for.

onlyManageablebooleannone

Whether to only retrieve rewards that can be managed by the API.

Return type: Array<HelixCustomReward>

getCustomRewardsByIds(broadcaster, rewardIds)

async

Retrieves custom rewards by IDs.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to retrieve the rewards for.

rewardIdsArray<string>none

The IDs of the rewards.

Return type: Array<HelixCustomReward>

getRedemptionById(broadcaster, rewardId, redemptionId)

async

Retrieves a custom reward redemption by ID.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to retrieve the redemption for.

rewardIdstringnone

The ID of the reward.

redemptionIdstringnone

The ID of the redemption.

Return type: HelixCustomRewardRedemption | null

getRedemptionsByIds(broadcaster, rewardId, redemptionIds)

async

Retrieves custom reward redemptions by IDs.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to retrieve the redemptions for.

rewardIdstringnone

The ID of the reward.

redemptionIdsArray<string>none

The IDs of the redemptions.

Return type: Array<HelixCustomRewardRedemption>

getRedemptionsForBroadcaster(broadcaster, rewardId, status, filter)

async

Retrieves custom reward redemptions for the given broadcaster.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to retrieve the redemptions for.

rewardIdstringnone

The ID of the reward.

status
HelixCustomRewardRedemptionStatus

The possible statuses of a custom Channel Points reward redemption.

Aliased type: "UNFULFILLED" |

HelixCustomRewardRedemptionTargetStatus

The possible statuses of a custom Channel Points reward redemption you can set.

Aliased type: "FULFILLED" | "CANCELED"

none

The status of the redemptions to retrieve.

filterHelixPaginatedCustomRewardRedemptionFilternone
filter.afterstringnone

A cursor to get the following page of.

filter.limitstringnone

The number of results per page.

filter.newestFirstbooleannone

Whether to put the newest redemptions first.

Oldest redemptions are shown first by default.

getRedemptionsForBroadcasterPaginated(broadcaster, rewardId, status, filter)

Creates a paginator for custom reward redemptions for the given broadcaster.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to retrieve the redemptions for.

rewardIdstringnone

The ID of the reward.

status
HelixCustomRewardRedemptionStatus

The possible statuses of a custom Channel Points reward redemption.

Aliased type: "UNFULFILLED" |

HelixCustomRewardRedemptionTargetStatus

The possible statuses of a custom Channel Points reward redemption you can set.

Aliased type: "FULFILLED" | "CANCELED"

none

The status of the redemptions to retrieve.

filterHelixCustomRewardRedemptionFilternone
filter.newestFirstbooleannone

Whether to put the newest redemptions first.

Oldest redemptions are shown first by default.

Return type: HelixPaginatedRequest<HelixCustomRewardRedemptionData, HelixCustomRewardRedemption>

updateCustomReward(broadcaster, rewardId, data)

async

Updates a custom reward.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to update the reward for.

rewardIdstringnone

The ID of the reward.

dataHelixUpdateCustomRewardDatanone

The reward data.

Return type: HelixCustomReward

updateRedemptionStatusByIds(broadcaster, rewardId, redemptionIds, status)

async

Updates the status of the given redemptions by IDs.

ParameterTypeRequiredDefaultDescription
broadcasterUserIdResolvablenone

The broadcaster to retrieve the redemptions for.

rewardIdstringnone

The ID of the reward.

redemptionIdsArray<string>none

The IDs of the redemptions to update.

status
HelixCustomRewardRedemptionTargetStatus

The possible statuses of a custom Channel Points reward redemption you can set.

Aliased type: "FULFILLED" | "CANCELED"

none

The status to set for the redemptions.

Return type: Array<HelixCustomRewardRedemption>