users.findMe()

This method retrieves an object representing the current user and their settings.

Definition

client.users.findMe(
options: ?Object
):Promise<Session,Error>

Parameters

ParameterTypeDescription
options?ObjectOptions (described below)

Options

ParameterTypeDescription
bypassCache?booleanIf true, always fetch from server, even if we already have a local copy

Returns

Once the returned Promise is resolved, we will have access to a User object of the current user.

Examples

const user = await client.users.findMe({ bypassCache: true });
console.log(user.displayName);