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

HelixChannelPointsApi

Overview

Methods

createCustomReward(broadcaster, data)

async

Creates a new custom reward.

ParameterTypeDescription
broadcasterUserIdResolvable

The broadcaster to create the reward for.

dataHelixCreateCustomRewardData

The reward data.

data.autoFulfillboolean

Whether the redemption should automatically set its status to fulfilled.

data.backgroundColorstring

The hex code of the background color of the reward.

data.costnumber

The channel points cost of the reward.

data.globalCooldownnumber | null

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

data.isEnabledboolean

Whether the reward is enabled (shown to users).

data.maxRedemptionsPerStreamnumber | null

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

data.maxRedemptionsPerUserPerStreamnumber | null

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

data.promptstring

The prompt shown to users when redeeming the reward.

data.titlestring

The title of the reward.

data.userInputRequiredboolean

Whether the reward requires user input to be redeemed.

Return type: HelixCustomReward

deleteCustomReward(broadcaster, rewardId)

async

Deletes a custom reward.

ParameterTypeDescription
broadcasterUserIdResolvable

The broadcaster to delete the reward for.

rewardIdstring

The ID of the reward.

Return type: void

getCustomRewardById(broadcaster, rewardId)

async

Retrieves a custom reward by ID.

ParameterTypeDescription
broadcasterUserIdResolvable

The broadcaster to retrieve the reward for.

rewardIdstring

The ID of the reward.

Return type: HelixCustomReward | null

getCustomRewards(broadcaster, onlyManageable)

async

Retrieves all custom rewards for the given broadcaster.

ParameterTypeDescription
broadcasterUserIdResolvable

The broadcaster to retrieve the rewards for.

onlyManageableboolean

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.

ParameterTypeDescription
broadcasterUserIdResolvable

The broadcaster to retrieve the rewards for.

rewardIdsArray<string>

The IDs of the rewards.

Return type: Array<HelixCustomReward>

getRedemptionById(broadcaster, rewardId, redemptionId)

async

Retrieves a custom reward redemption by ID.

ParameterTypeDescription
broadcasterUserIdResolvable

The broadcaster to retrieve the redemption for.

rewardIdstring

The ID of the reward.

redemptionIdstring

The ID of the redemption.

Return type: HelixCustomRewardRedemption | null

getRedemptionsByIds(broadcaster, rewardId, redemptionIds)

async

Retrieves custom reward redemptions by IDs.

ParameterTypeDescription
broadcasterUserIdResolvable

The broadcaster to retrieve the redemptions for.

rewardIdstring

The ID of the reward.

redemptionIdsArray<string>

The IDs of the redemptions.

Return type: Array<HelixCustomRewardRedemption>

getRedemptionsForBroadcaster(broadcaster, rewardId, status, filter)

async

Retrieves custom reward redemptions for the given broadcaster.

ParameterTypeDescription
broadcasterUserIdResolvable

The broadcaster to retrieve the redemptions for.

rewardIdstring

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"

The status of the redemptions to retrieve.

filterHelixPaginatedCustomRewardRedemptionFilter
filter.afterstring

A cursor to get the following page of.

filter.limitstring

The number of results per page.

filter.newestFirstboolean

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.

ParameterTypeDescription
broadcasterUserIdResolvable

The broadcaster to retrieve the redemptions for.

rewardIdstring

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"

The status of the redemptions to retrieve.

filterHelixCustomRewardRedemptionFilter
filter.newestFirstboolean

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.

ParameterTypeDescription
broadcasterUserIdResolvable

The broadcaster to update the reward for.

rewardIdstring

The ID of the reward.

dataHelixUpdateCustomRewardData

The reward data.

Return type: HelixCustomReward

updateRedemptionStatusByIds(broadcaster, rewardId, redemptionIds, status)

async

Updates the status of the given redemptions by IDs.

ParameterTypeDescription
broadcasterUserIdResolvable

The broadcaster to retrieve the redemptions for.

rewardIdstring

The ID of the reward.

redemptionIdsArray<string>

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"

The status to set for the redemptions.

Return type: Array<HelixCustomRewardRedemption>