# Учетная запись

#### GET /api/v3/private/account

Этот эндпоинт предоставляет подробные данные о текущем авторизованном пользователе, отправившем запрос с API-ключом. Используется для отображения данных профиля, проверки локали пользователя, даты регистрации и последней активности.

***

#### Требуемый доступ (ability)

{% hint style="warning" %}

## Чтобы этот метод работал, вашему API-ключу должен быть выдан доступ:

Нужно разрешение: **account**

Если у ключа нет этого разрешения, сервер вернёт ошибку доступа (403)

с указанием, какого именно разрешения не хватает.
{% endhint %}

Пример ошибки при отсутствии доступа:

```
{
  "status": 1,
  "message": "You do not have access to this route",
  "missing_ability": "account"
}
```

Если вы получили такой ответ — обратитесь к администратору обменника, чтобы он выдал вашему ключу нужное разрешение.

***

#### Пример запроса (cURL)

```
curl -X GET "https://app.{ваш_домен}/api/v3/private/account" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json; charset=utf-8" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

#### Пример запроса (Laravel HTTP Client)

```php
use Illuminate\Support\Facades\Http;

$apiKey  = 'YOUR_API_KEY';

$client = Http::baseUrl('https://app.{ваш_домен}/api/v3/private')
    ->withToken($apiKey)
    ->acceptJson()
    ->asJson();

$response = $client->get('account');

if ($response->successful()) {
    $data = $response->json();
    dd($data);
} else {
    dd('ERROR', $response->status(), $response->body());
}
```

#### Пример успешного ответа

Ответ формируется в формате JSON и содержит данные вашего аккаунта:

```json
{
  "id": 15,
  "type": "user",
  "attributes": {
    "name": "Demo User",
    "email": "demo@example.com",
    "locale": "ru",
    "created_at": 1719253021,
    "last_visit": 1719852021
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.iexexchanger.com/front-api/private-api/uchetnaya-zapis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
