Get users

The users.getUsers method on a Client instance makes a GET request to the users endpoint and returns an array of users.

Example

const users = await api.users.getUsers({
  query: {
    ids: [14544646, 3171691]
  }
});

Parameters

ParameterTypeOptionalDescription
optionsGetUsersOptions

options.query

ParameterTypeOptionalDescription
idsnumber[]An array of user IDs (can only take up to 50 IDs)
include_variant_statisticsbooleanInclude statistics_rulesets.variants?

Returns

Promise<
  (UserCompact & {
    country: Country;
    cover: Cover;
    groups: UserGroup[];
    statistics_rulesets: StatisticsRulesets;
  })[]
>;

Types

Possible Exceptions

See the error handling documentation for more information.

  • invalid_json_syntax
  • network_error
  • unexpected_response

Notice that something is missing? Found a typo? Think something's incomplete? Or think that something can be explained better? Feel free to open a pull request or submit an issue on the library's Github repository .