Skip to main content

Users - Get

Description

Gets information about one or more specified Twitch users. Users are identified by optional user IDs and/or login name. If neither a user ID nor a login name is specified, the user is looked up by Bearer token.

To include the user’s verified email address in the response, you must use a user access token that includes the user:read:email scope (and matches their ID).

Method Definition

@RequestLine("GET /users?id={id}&login={login}")
@Headers("Authorization: Bearer {token}")
HystrixCommand<UserList> getUsers(
@Param("token") String authToken,
@Param("id") List<String> userIds,
@Param("login") List<String> userNames
);

Required Parameters

NameTypeDescription
authTokenstringUser or App Access Token.

Optional Parameters

NameTypeDescription
idstringUser ID. Multiple user IDs can be specified. Limit: 100.
loginstringUser login name. Multiple login names can be specified. Limit: 100.

Code-Snippets

UserList resultList = twitchClient.getHelix().getUsers(null, Arrays.asList("149223493"), null).execute();
resultList.getUsers().forEach(user -> {
System.out.println(user);
});
UserList resultList = twitchClient.getHelix().getUsers(null, null, Arrays.asList("twitch4j")).execute();
resultList.getUsers().forEach(user -> {
System.out.println(user);
});