> This page is for Docs.

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

# Current user information

GET https://docs.example.com/api/fern-docs/whoami

Get authentication information for the current user, including their name, email, and roles.

Reference: https://buildwithfern.com/learn/docs/fern-api-reference/whoami

## Authentication

- `FERN_TOKEN` header (required) — JWT token for this user.

## Response

### 200

Successfully retrieved user information

- `fern_token` (string, required) — JWT token for the authenticated user
- `user_info` (ApiFernDocsWhoamiGetResponsesContentApplicationJsonSchemaUserInfo, required)

## Errors

### 400 Bad Request Error

Bad request (authentication not accessible in local preview mode)

- `error` (string, optional)

### 401 Unauthorized Error

Unauthorized (user not authenticated or invalid/expired token)

- `error` (string, optional)

### 500 Internal Server Error

Internal server error (authentication configuration not found or server error)

- `error` (string, optional)

## Types

### ApiFernDocsWhoamiGetResponsesContentApplicationJsonSchemaUserInfo

- `name` (string, required) — User's display name
- `email` (string, required) — User's email address
- `roles` (list of string, required) — User's assigned roles

## Examples

**Response**

```json
{
  "fern_token": "string",
  "user_info": {
    "name": "string",
    "email": "string",
    "roles": [
      "string"
    ]
  }
}
```