users.findMe()
This method retrieves an object representing the current user and their settings.
Definition
client.users.findMe(options: ?Object):Promise<Session,Error>
Parameters
Parameter | Type | Description |
---|---|---|
options | ?Object | Options (described below) |
Options
Parameter | Type | Description |
---|---|---|
bypassCache | ?boolean | If 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);