Skip to main content

Moderators - Get

Description

Returns all moderators in a channel.

Requires a user access token from the broadcaster that includes the moderation:read scope. If your app also adds and removes moderators, you can use the channel:manage:moderators scope instead.

Method Definition

@RequestLine(value = "GET /moderation/moderators?broadcaster_id={broadcaster_id}&user_id={user_id}&after={after}&first={first}", collectionFormat = CollectionFormat.CSV)
@Headers("Authorization: Bearer {token}")
HystrixCommand<ModeratorList> getModerators(
@Param("token") String authToken,
@Param("broadcaster_id") String broadcasterId,
@Param("user_id") List<String> userIds,
@Param("after") String after,
@Param("first") Integer limit
);

Required Parameters

NameTypeDescription
authTokenstringUser Token for the broadcaster (scope: moderation:read)
broadcasterIdstringThe ID of the broadcaster whose list of moderators you want to get. This ID must match the user ID in the access token.

Optional Parameters

NameTypeDescription
userIdsstringFilters the results and only returns a status object for users who are moderators in this channel and have a matching user_id. The list is returned in the same order as you specified the IDs.
afterstringCursor for forward pagination: tells the server where to start fetching the next set of results, in a multi-page response. The cursor value specified here is from the pagination response field of a prior query.
limitintegerMaximum number of objects to return per page in the response. Maximum: 100. Default: 20.

Code-Snippets

ModeratorList resultList = twitchClient.getHelix().getModerators(authToken, broadcasterId, null, null, null).execute();
resultList.getModerators().forEach(moderator -> {
System.out.println(moderator);
});