Skip to content
twitch.apiv2.0

Reference / API groups

twitch.entitlements

Drops entitlements: list them and mark them fulfilled.

Every method of twitch.entitlements, with its parameters, what it returns and the token it needs.

twitch.entitlements.drops(params?, options?): Paginator<DropsEntitlement>

Lists the Drops entitlements of your organization, in no particular order. An app token reads those of every user, a user token only those of its own user. Your client ID must belong to the organization that owns the game.

Token: app or user.

NameTypeDescription
idstring | readonly string[]Only these entitlements. Up to 100 IDs.
user_idstringOnly entitlements of this user. App tokens only: a user token always reads its own user.
game_idstringOnly entitlements of this game.
fulfillment_statusDropsFulfillmentStatusOnly entitlements with this status.
afterstringCursor of the next page.
firstnumberItems per page, 1 to 1000. Twitch defaults to 20.

options: Request options for this call: as, token, signal, timeout, retries.

Paginator<DropsEntitlement>

Fields of DropsEntitlement
NameTypeDescription
idstringID of the entitlement.
benefit_idstringID of the reward.
timestampstringWhen the entitlement was granted, as an RFC 3339 timestamp.
user_idstringID of the user who earned the reward.
game_idstringID of the game the reward belongs to.
fulfillment_statusDropsFulfillmentStatusWhether the reward was only claimed or already delivered.
last_updatedstringWhen the entitlement last changed, as an RFC 3339 timestamp.
const claimed = twitch.entitlements.drops({ game_id: "33214", fulfillment_status: "CLAIMED" });
for await (const entitlement of claimed) console.log(entitlement.user_id, entitlement.benefit_id);

Twitch reference

twitch.entitlements.updateDrops(params?, options?): Promise<DropsEntitlementUpdate[]>

Sets the status of Drops entitlements, typically to "FULFILLED" once the reward was delivered in game. The result groups the IDs by outcome, so check it: a call can succeed for some entitlements only.

Token: app or user.

NameTypeDescription
entitlement_idsreadonly string[]IDs of the entitlements to change. Up to 100.
fulfillment_statusDropsFulfillmentStatusStatus to give them.

options: Request options for this call: as, token, signal, timeout, retries.

Promise<DropsEntitlementUpdate[]>

Fields of DropsEntitlementUpdate
NameTypeDescription
status"INVALID_ID" | "NOT_FOUND" | "SUCCESS" | "UNAUTHORIZED" | "UPDATE_FAILED"What happened to the entitlements listed in ids. "UPDATE_FAILED" is temporary: try those again later.
idsstring[]IDs of the entitlements this status applies to.
const results = await twitch.entitlements.updateDrops({
entitlement_ids: ["0b6a2c1e-5d47-4f0a-9c3e-7a1d2e8f4b65"],
fulfillment_status: "FULFILLED",
});
const failed = results.filter((result) => result.status !== "SUCCESS");

Twitch reference