Channels
Connecting a new bot through the API is not possible, as each messenger has its own characteristics. To add a bot, please use your personal cabinet.
How to determine bot (channel) status
Each channel connected to the HighTouch platform has two statuses:
Bot status
Adapter status
Bot status is used to manually stop and start the bot. Possible options:
1
- Bot created
3
- Stopped manually
5
- Launched
The status of the bot can be obtained by querying /bot/bots/:id/
in the field status
Adapter status reflects the connection status of the HighTouch platform and messenger servers for running bots (which have bot status 1
).
Adapter status reflects the real state of the channel (bot). You can find it out by running the query/bot/bot/:id/status/
. The possible statuses are listed in the documentation for this request.
If the bot is stopped manually, the status of the adapter is meaningless, because the HighTouch platform closes all connections to messenger servers. The possible statuses are listed in the documentation for this request.
Bot list
GET
https://app.hightouch.ai/api/bot/bots/
Query Parameters
Name | Type | Description |
---|---|---|
shop_id | integer | Store ID |
Information about the bot
GET
https://app.hightouch.ai/api/bot/bots/:id/
Path Parameters
Name | Type | Description |
---|---|---|
id | integer | Bot ID |
Bot status
GET
https://app.hightouch.ai/api/bot/bot/:id/status/
Возможные статусы ботов:
0
- [all] Stopped
1
- [vk] Community callback is not installed
2
- [vk] sending required events is disabled for the community
3
- [vk] bot capabilities are disabled for the community
21
- [telegram] access_token out of date
22
- [telegram] access_token not valid (entered incorrectly)
5
- [all] Running
6
- [whatsapp] Phone is not connected
7
- [avito] Bot connected, waiting for the first message from subscribers
8
- [all] Webhook is installed, but the webhook URL is incorrect
10
- [all] Working
Path Parameters
Name | Type | Description |
---|---|---|
id | integer | ID бота |
Reboot (reconnect) the bot
GET
https://app.hightouch.ai/api/bot/bot/:id/restart/
This query performs several tasks at once: 1. Restarts stopped bots 2. Resets webhook (depending on the messenger) 3. Updates connections to messenger servers
Path Parameters
Name | Type | Description |
---|---|---|
id | integer | Bot ID |
Stop the bot
GET
https://app.hightouch.ai/api/bot/bot/:id/stop/
The bot will stop receiving and sending messages.
In the future you will be able to restart the bot with the request /bot/bot/:id/restart/
Path Parameters
Name | Type | Description |
---|---|---|
id | integer | Bot ID |
Delete the bot
DELETE
https://app.hightouch.ai/api/bot/bots/:id/
Path Parameters
Name | Type | Description |
---|---|---|
id | integer | Bot ID |
Last updated