Skip to main content
mesa.whoami() calls the API once, caches the result, and also populates the client’s default organization. Required scope: read
identity = await mesa.whoami()
print(identity.org.slug)
print(identity.key_id)

Options

This method does not take options.

Response

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

OrgIdentity

id
str
Organization ID.
slug
str
Organization slug.
name
str
Organization display name.

Errors

Raises AuthenticationError for invalid API keys and other ApiError subclasses for non-2xx responses.