Skip to main content

Drops - Get Entitlements

Description

Gets an organization's list of entitlements that have been granted to a game, a user, or both.

The client ID in the access token must own the game. App access tokens can pass any combination of request parameters (below) while requests using user access tokens must not specify any userId.

Valid combinations of request parameters are (given appropriate oauth access):

  • no fields
  • only userId
  • only gameId
  • both userId and gameId

Method Definition

@RequestLine("GET /entitlements/drops?id={id}&user_id={user_id}&game_id={game_id}&fulfillment_status={fulfillment_status}&after={after}&first={first}")
@Headers("Authorization: Bearer {token}")
HystrixCommand<DropsEntitlementList> getDropsEntitlements(
@Param("token") String authToken,
@Param("id") String id,
@Param("user_id") String userId,
@Param("game_id") String gameId,
@Param("fulfillment_status") DropFulfillmentStatus status,
@Param("after") String after,
@Param("first") Integer limit
);

Required Parameters

NameTypeDescription
authTokenstringApp access token or user access token

Optional Parameters

NameTypeDescription
idstringUnique identifier of the entitlements
user_idstringUser ID, that was granted entitlements
game_idstringGame ID, that offered entitlements
fulfillment_statusenumStatus used to filter entitlements. Example- 'claimed' or 'fulfilled'
afterstringThe cursor used to get the next page of results.
firstintegerThe maximum number of entitlements to return per page in the response.

Code Snippets

DropsEntitlementList resultList = twitchClient.getHelix().getDropsEntitlements("appAccessToken", "entitlementId", null, null, null, null, 1000).execute();
resultList.getData().forEach(drop -> System.out.printf("User ID: %s - Status: %s\n", drop.getUserId(), drop.getFulfillmentStatus()));
DropsEntitlementList resultList = twitchClient.getHelix().getDropsEntitlements("appAccessToken", null, null, "gameId", null, null, 1000).execute();
resultList.getData().forEach(drop -> System.out.printf("User ID: %s - Status: %s\n", drop.getUserId(), drop.getFulfillmentStatus()));
DropsEntitlementList resultList = twitchClient.getHelix().getDropsEntitlements("appAccessToken", null, "userId", null, null, null, 1000).execute();
resultList.getData().forEach(drop -> System.out.printf("Game ID: %s - Status: %s\n", drop.getGameId(), drop.getFulfillmentStatus()));
DropsEntitlementList resultList = twitchClient.getHelix().getDropsEntitlements("appAccessToken", null, null, null, DropFulfillmentStatus.CLAIMED, null, 1000).execute();
resultList.getData().forEach(drop -> System.out.printf("User ID: %s - Timestamp: %s\n", drop.getUserId(), drop.getUpdatedAt()));