# Создание jwt токена

## Создание jwt токена

<mark style="color:green;">`POST`</mark> `/token/`

Создание jwt токена по email и пароль

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |

**Body**

| Name       | Type   | Description         |
| ---------- | ------ | ------------------- |
| `email`    | string | Email пользователя  |
| `password` | string | Пароль пользователя |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTcyNTAzNTUzMiwiaWF0IjoxNzI0OTQ5MTMyLCJqdGkiOiI4Y2U1OTY0NmYxZDY0NzY5ODM5NGM1ZjNlOTIwNTNiYSIsInVzZXJfaWQiOjIwNjY2MSwicm9sZXMiOltdLCJpcF9hZGRyZXNzIjoiNDYuMjQ2LjkzLjIxNyJ9.52ODXJPkNtWx6FdUFUlFiKpVgvARe5OjZU8KvkhZLvw",
    "access": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzI0OTQ5MTkyLCJpYXQiOjE3MjQ5NDkxMzIsImp0aSI6IjRlNmNjNWEzZTI5MjRmNThhNzA4ZDEwMTUxMmMzMTYzIiwidXNlcl9pZCI6MjA2NjYxLCJyb2xlcyI6W10sImlwX2FkZHJlc3MiOiI0Ni4yNDYuOTMuMjE3In0.MURebFOrrVC_BiAgUCBoBzH1mNE4GPBRGy-Y6u-z8PM"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "email": [
        "Обязательное поле."
    ],
    "password": [
        "Обязательное поле."
    ]
}
```

{% endtab %}

{% tab title="401" %}

```json
{
    "detail": "Не найдено активной учетной записи с указанными данными"
}
```

{% endtab %}
{% endtabs %}


---

# 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://exchangerretp4lrpg6lp2.mikroservis.one/avtorizaciya/sozdanie-jwt-tokena.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.
