# Auth

## Me

`client.auth.me(RequestOptionsoptions?): AuthMeResponse`

**get** `/compute/v1/auth/me`

Returns the organization context available to the current API key or OAuth bearer token. OAuth callers can use X-Boltz-Organization-Id to select one of their organizations.

### Returns

- `AuthMeResponse = AuthMeAPIKeyResponse | AuthMeUserResponse`

  - `AuthMeAPIKeyResponse`

    - `api_key_id: string`

    - `key_type: "admin" | "workspace"`

      - `"admin"`

      - `"workspace"`

    - `mode: "live" | "test"`

      - `"live"`

      - `"test"`

    - `organization_id: string`

    - `principal_type: "api_key"`

      - `"api_key"`

    - `selected_organization_id: string`

    - `workspace_id: string | null`

  - `AuthMeUserResponse`

    - `active_organization_id: string | null`

    - `organization_memberships: Array<OrganizationMembership>`

      - `compute_role: "admin" | "member"`

        - `"admin"`

        - `"member"`

      - `organization_id: string`

    - `principal_type: "user"`

      - `"user"`

    - `selected_organization_id: string | null`

    - `user_id: string`

### Example

```typescript
import Boltz from 'boltz-api';

const client = new Boltz({
  apiKey: process.env['BOLTZ_API_KEY'], // This is the default and can be omitted
});

const response = await client.auth.me();

console.log(response);
```
