> ## 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.

# Вход

> Аутентификация по email и паролю

<ParamField body="email" type="string" required>
  Email пользователя.
</ParamField>

<ParamField body="password" type="string" required>
  Пароль аккаунта.
</ParamField>

## Запрос

```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"}'
```

## Ответ

```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
  }
}
```

`access_token` истекает через **15 минут**. Используйте `refresh_token` для обновления через [Refresh](/ru/api-reference/auth/refresh).

## Ошибки

| Код   | Значение                    |
| ----- | --------------------------- |
| `401` | Неверный email или пароль   |
| `403` | Email не подтверждён        |
| `429` | Слишком много попыток входа |
