> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mesa.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# whoami()

> Return the caller's authenticated organization, key metadata, and scopes.

Fetch the authenticated key, scopes, and default organization.

**Required scope: `read`**

```ts theme={null}
const identity = await mesa.whoami();

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

## Options

This method does not accept options.

## Response

<ResponseField name="org" type="OrgIdentity">
  Organization associated with the authenticated key.
</ResponseField>

<ResponseField name="key_id" type="string | null">
  Current API key or key ID, or null when unavailable.
</ResponseField>

<ResponseField name="key_name" type="string | null">
  Current API key name. Private-key clients return null.
</ResponseField>

<ResponseField name="scopes" type="string[]">
  Effective scopes granted to the credential.
</ResponseField>

### OrgIdentity

<ResponseField name="id" type="string">
  Organization ID.
</ResponseField>

<ResponseField name="slug" type="string">
  Organization slug.
</ResponseField>

<ResponseField name="name" type="string">
  Organization display name.
</ResponseField>
