# Работа с API платформы

{% hint style="info" %}
**Основы:**
{% endhint %}

**Для доступа к API необходимо подключить тарифный план PRO.**

В каждом запросе API необходимо отправлять токен в GET-параметре `api_token`.Токен вы можете получить в разделе <https://account.onebot.tech/account/api>.

```
https://app.onebot.tech/api/v1/method?api_token=Ваш API token
```

Так же необходимо передавать следующий заголовок:

```
X-Requested-With:XMLHttpRequest
```

{% hint style="info" %}
**ID бота:**
{% endhint %}

В некоторых методах API необходимо отправлять ID бота, на рисунке изображено где его найти.

<figure><img src="/files/W3xfBKCBzs0fjjJUifF6" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Лимиты:**
{% endhint %}

К API сервиса Onebot разрешено делать не более 2 запросов в секунду (120 запросов в минуту), иначе API будет возвращать ошибку `429 Too Many Requests.`&#x20;

Так же на некоторые методы могут накладываться свои ограничения.

{% content-ref url="/pages/PRcNVfkt5iXTGxK1JSEX" %}
[Аккаунт](/onebot-help/rabota-s-api-platformy/akkaunt.md)
{% endcontent-ref %}

{% content-ref url="/pages/1kPZsxVbGuolkDyeGIJZ" %}
[Сообщения](/onebot-help/rabota-s-api-platformy/soobsheniya.md)
{% endcontent-ref %}

{% content-ref url="/pages/iOcCT0EzJCtOivOgyT5M" %}
[Рассылка](/onebot-help/rabota-s-api-platformy/rassylka.md)
{% endcontent-ref %}

{% content-ref url="/pages/4gpzn1RDXXw1RK3siEzr" %}
[Контакты](/onebot-help/rabota-s-api-platformy/kontakty.md)
{% endcontent-ref %}


---

# 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://help.onebot.tech/onebot-help/rabota-s-api-platformy.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.
