# Основы

Для доступа к API необходимо подключить соответствующий тарифный план.&#x20;

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

```http
https://watbot.ru/api/v1/method?api_token=Ваш API token
```

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

```
Accept:application/json
```

## Лимиты

К API сервиса WatBot разрешено делать не более 2 запросов в секунду (120 запросов в минуту). Иначе API будет возвращать ошибку `429 Too Many Requests` Так же на некоторые методы могут накладываться свои ограничения.

{% hint style="danger" %}
Запрещено хранить токен в открытом виде, например в клиентских приложениях, где любой желающий может посмотреть этот токен.
{% endhint %}

## ID бота

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

![ID бота = 1](/files/-LrIqtqFVp0_Z3Ogjf9C)


---

# 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.watbot.ru/rabota-s-api/osnovy.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.
