Asosiy qismga o'tish
ChatVendor ChatVendor

Messenjer API

Panel ulangan Telegram, WhatsApp yoki Instagram akkaunt bilan qila oladigan hamma narsa — REST orqali: bitta kalit, bitta javob formati, bo'limma-bo'lim.

Messenger, Viber, sayt chati

Facebook sahifa (fb_{id}), Viber bot (vb_{id}) va sayt vidjeti (web_{id}) uchun xuddi shu chat endpointlari.

Base URL: https://chatvendor.net/api/v1 · har javob {"success": true, "data": …}

GET /channels/fb_{id}/dialogs Messenger (Facebook Page): chats (peer = PSID). Messages, file, read, media: the same paths as WhatsApp with fb_{id}

Ruxsat: channels:read

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

Javob 200 · Dialog[]

peer_id integertype stringtitle stringusername stringunread_count integerlast_message_at string (date-time)last_message_text string

curl https://chatvendor.net/api/v1/channels/fb_1/dialogs \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
POST /channels/fb_{id}/dialogs/{peer}/messages Messenger: send text (buttons = quick replies; reply_to + public_reply answers a comment in the thread)

Ruxsat: channels:write

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

peerpath · stringmajburiy

Telegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone

So'rov tanasi (application/json)

textstring
reply_tointeger
buttonsstring[]

Javob 200 · ChatMessage

id integerchat_id integersender_id integersender_name stringout booleandate string (date-time)text stringmedia objectreply_to integertopic_id integerbuttons object[][]

curl -X POST https://chatvendor.net/api/v1/channels/fb_1/dialogs/@username/messages \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
  -H "Content-Type: application/json" \
  -d '{"text":"…","reply_to":1,"buttons":[]}'
GET /channels/vb_{id}/dialogs Viber bot: chats (peer = local id; user ids are strings). Messages, file, read, media: the same paths as WhatsApp with vb_{id}

Ruxsat: channels:read

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

Javob 200 · Dialog[]

peer_id integertype stringtitle stringusername stringunread_count integerlast_message_at string (date-time)last_message_text string

curl https://chatvendor.net/api/v1/channels/vb_1/dialogs \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
POST /channels/vb_{id}/dialogs/{peer}/messages Viber: send text (buttons = reply keyboard, up to 24; a button may carry url)

Ruxsat: channels:write

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

peerpath · stringmajburiy

Telegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone

So'rov tanasi (application/json)

textstring
buttonsstring[]

Javob 200 · ChatMessage

id integerchat_id integersender_id integersender_name stringout booleandate string (date-time)text stringmedia objectreply_to integertopic_id integerbuttons object[][]

curl -X POST https://chatvendor.net/api/v1/channels/vb_1/dialogs/@username/messages \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
  -H "Content-Type: application/json" \
  -d '{"text":"…","buttons":[]}'
GET /channels/web_{id}/dialogs Website widget: visitor chats (peer = visitor id). Messages, file, read, media: the same paths as WhatsApp with web_{id}

Ruxsat: channels:read

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

Javob 200 · Dialog[]

peer_id integertype stringtitle stringusername stringunread_count integerlast_message_at string (date-time)last_message_text string

curl https://chatvendor.net/api/v1/channels/web_1/dialogs \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
POST /channels/web_{id}/dialogs/{peer}/messages Website widget: send text to a visitor (buttons render as chips; a button may carry url)

Ruxsat: channels:write

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

peerpath · stringmajburiy

Telegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone

So'rov tanasi (application/json)

textstring
buttonsstring[]

Javob 200 · ChatMessage

id integerchat_id integersender_id integersender_name stringout booleandate string (date-time)text stringmedia objectreply_to integertopic_id integerbuttons object[][]

curl -X POST https://chatvendor.net/api/v1/channels/web_1/dialogs/@username/messages \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
  -H "Content-Type: application/json" \
  -d '{"text":"…","buttons":[]}'