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

# Login

> Authenticate with email and password

<ParamField body="email" type="string" required>
  User email address.
</ParamField>

<ParamField body="password" type="string" required>
  Account password.
</ParamField>

## Request

```bash theme={null}
curl -X POST https://elumenta.ru/api/v2/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com", "password": "your_password"}'
```

## Response

```json theme={null}
{
  "access_token": "eyJhbGciOiJIUzI1NiJ9...",
  "refresh_token": "eyJhbGciOiJIUzI1NiJ9...",
  "token_type": "bearer",
  "user": {
    "id": 12345,
    "email": "user@example.com",
    "username": "user",
    "plan": "pro",
    "token_balance": 543
  }
}
```

The `access_token` expires in **15 minutes**. Use the `refresh_token` to get a new one via [Refresh](/en/api-reference/auth/refresh).

## Errors

| Code  | Meaning                   |
| ----- | ------------------------- |
| `401` | Invalid email or password |
| `403` | Email not verified        |
| `429` | Too many login attempts   |
