Vexar API

Telegram & Viber

Telegram operator notifications (get notified of new chats in Telegram) and the incoming bot webhooks. To connect a Telegram/Viber bot for visitors, see Channels.

Operator notifications

POST /api/v1/telegram/connect Auth

Link a site to a Telegram chat for operator notifications.

Request body
{ "site_id": 1 }
Response
{ "success": true, "connect_url": "https://t.me/…" }
POST /api/v1/telegram/disconnect Auth

Disconnect Telegram notifications.

Request body
{ "site_id": 1 }
Response
{ "success": true, "message": "Telegram disconnected" }
GET /api/v1/telegram/status Auth

Connection status for a site.

ParamTypeInDescription
site_idintquery
Response
{ "success": true, "connected": true }

Webhooks (incoming)

These are called by Telegram/Viber, not by you. They always return { "ok": true }.

POST /telegram/webhook Public

Telegram notifications bot webhook.

Response
{ "ok": true }
POST /telegram/bot/{channelId} Public

Per-channel Telegram visitor bot webhook.

Response
{ "ok": true }
POST /viber/bot/{channelId} Public

Per-channel Viber visitor bot webhook.

Response
{ "ok": true }