TwurpleAuthenticationGetting dataExamplesFAQMigration

Main classes

HelixChannelPointsApi

The Helix API methods that deal with channel points.

Overview

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

Example

const api = new ApiClient({ authProvider });
const rewards = await api.channelPoints.getCustomRewards('125328655');

Methods

createCustomReward(broadcaster, data)

async

Creates a new custom reward.

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 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
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 to delete the reward for.

rewardIdstringnone

The ID of the reward.

Return type: void

getCustomRewardById(broadcaster, rewardId)

async

Gets a custom reward by ID.

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 to get the reward for.

rewardIdstringnone

The ID of the reward.

Return type: HelixCustomReward | null

getCustomRewards(broadcaster, onlyManageable)

async

Gets all custom rewards for the given 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 to get the rewards for.

onlyManageablebooleannone

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

Return type: HelixCustomReward[]

getCustomRewardsByIds(broadcaster, rewardIds)

async

Gets custom rewards by IDs.

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 to get the rewards for.

rewardIdsstring[]none

The IDs of the rewards.

Return type: HelixCustomReward[]

getRedemptionById(broadcaster, rewardId, redemptionId)

async

Gets a custom reward redemption by ID.

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 to get the redemption for.

rewardIdstringnone

The ID of the reward.

redemptionIdstringnone

The ID of the redemption.

Return type: HelixCustomRewardRedemption | null

getRedemptionsByIds(broadcaster, rewardId, redemptionIds)

async

Gets custom reward redemptions by IDs.

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 to get the redemptions for.

rewardIdstringnone

The ID of the reward.

redemptionIdsstring[]none

The IDs of the redemptions.

getRedemptionsForBroadcaster(broadcaster, rewardId, status, filter)

async

Gets custom reward redemptions for the given 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 to get 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 get.

filterHelixPaginatedCustomRewardRedemptionFilternonesee below
filter.afterstringnone

A cursor to get the following page of.

filter.limitnumbernone

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
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 to get 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 get.

filterHelixCustomRewardRedemptionFilternonesee below
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
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 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
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 to update the redemptions for.

rewardIdstringnone

The ID of the reward.

redemptionIdsstring[]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.