Get self

The users.getSelf method on a Client instance makes a GET request to the me endpoint and returns the user corresponding to the access token provided in the constructor of the Client class.

Example

const user = await api.users.getSelf({
  urlParams: {
    mode: 'osu'
  }
});

Parameters

ParameterTypeOptionalDescription
optionsGetSelfOptions

options.urlParams

ParameterTypeOptionalDescription
modeGameModeGamemode of the profile to return

Returns

Promise<
  UserExtended & {
    is_restricted: boolean;
    session_verified: boolean;
    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 .