# Авторизация

## Как получить доступ к Mottor API

Любой пользователь конструктора сайтов [Mottor](https://lpmotor.ru) уже имеет доступ к API. Для этого надо получить API-ключ и ID пользователя.

### Как получить ID пользователя

1. Зайти в [личный кабинет Mottor](https://lpmotor.ru/admin).
2. Нажать в правом верхнем углу на имя пользователя и скопировать значение `Ваш ID`

![](https://4178685638-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MfgguQGUMoI7nmp-NJg%2F-MgjIakzU6hzllHg66ly%2F-MgjIlcyVtNEcwCmq5FV%2Fid.png?alt=media\&token=8cbb60e2-e207-4f6e-8f16-f65a4227c319)

### Как получить API-ключ

1. Зайти в [личный кабинет Mottor](https://lpmotor.ru/admin).
2. Зайти в раздел "[Профиль](https://lpmotor.ru/admin/profile/view/general)".
3. Скопировать значение из секции "API-ключ".

{% hint style="danger" %}
&#x20;**Не передавайте ключ посторонним людям!!!**

Запросы к API изменяют данные на ваших сайтах. Если доступ к ключу будет у посторонних лиц, они смогут управлять вашими сайтами.
{% endhint %}

{% hint style="info" %}
Если ключ попал в чужие руки, то в личном кабинете перейдите в профиль и в секции "API-ключ" сгенерируйте новый токен.
{% endhint %}

### Отправка запросов

Все запросы должны содержать в себе 2 заголовка:&#x20;

| Имя заголовка | Значение заголовка   |
| ------------- | -------------------- |
| X-Api-User-Id | id пользователя      |
| Authorization | "Bearer " + API-ключ |


---

# 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://developer.lpmotor.ru/avtorizaciya.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.
