Skip to main content

Entitlements - Get Code Status

Description

Gets the status of one or more provided codes.

warning

Twitch decommissioned this endpoint on 2023-02-27.

Method Definition

@Deprecated
@RequestLine("GET /entitlements/codes?code={code}&user_id={user_id}")
@Headers("Authorization: Bearer {token}")
HystrixCommand<CodeStatusList> getCodeStatus(
@Param("token") String authToken,
@Param("code") List<String> code,
@Param("user_id") Integer userId
);

Required Parameters

NameTypeDescription
authTokenstringApp Access Token
codestringThe code to get the status of.
userIdintegerRepresents a numeric Twitch user ID

Code-Snippets

CodeStatusList codeStatusList = twitchClient.getHelix().getCodeStatus(authToken, Arrays.asList("KUHXV-4GXYP-AKAKK"), 156900877).execute();
codeStatusList.getStatuses().forEach(codeStatus -> {
System.out.println(codeStatus.getCode() + " " + codeStatus.getStatus());
});