Skip to main content
Fetch the authenticated key, scopes, and default organization. Required scope: read
const identity = await mesa.whoami();

console.log(identity.org.slug);
console.log(identity.scopes);

Options

This method does not accept options.

Response

org
OrgIdentity
Organization associated with the authenticated key.
key_id
string | null
Current API key ID, or null when unavailable.
key_name
string | null
Current API key name, or null when unavailable.
scopes
string[]
Scopes granted to the current key.

OrgIdentity

id
string
Organization ID.
slug
string
Organization slug.
name
string
Organization display name.