Nhóm
Nhóm chat: thông tin, thành viên, đổi tên, link mời. · 38 endpoint
- GET/accounts/{accountId}/groups
- POST/accounts/{accountId}/groups
- GET/accounts/{accountId}/groups/{groupId}
- PATCH/accounts/{accountId}/groups/{groupId}
- DELETE/accounts/{accountId}/groups/{groupId}
- GET/accounts/{accountId}/groups/{groupId}/members
- POST/accounts/{accountId}/groups/{groupId}/members
- DELETE/accounts/{accountId}/groups/{groupId}/members/{userId}
- GET/accounts/{accountId}/groups/{groupId}/invite-link
- POST/accounts/{accountId}/groups/{groupId}/invite-link
- DELETE/accounts/{accountId}/groups/{groupId}/invite-link
- POST/accounts/{accountId}/groups/{groupId}/leave
- POST/accounts/{accountId}/groups/{groupId}/admins
- DELETE/accounts/{accountId}/groups/{groupId}/admins/{userId}
- POST/accounts/{accountId}/groups/{groupId}/owner
- PUT/accounts/{accountId}/groups/{groupId}/avatar
- GET/accounts/{accountId}/groups/{groupId}/settings
- PATCH/accounts/{accountId}/groups/{groupId}/settings
- GET/accounts/{accountId}/groups/{groupId}/pending-members
- POST/accounts/{accountId}/groups/{groupId}/pending-members/review
- GET/accounts/{accountId}/groups/{groupId}/blocked-members
- POST/accounts/{accountId}/groups/{groupId}/blocked-members
- DELETE/accounts/{accountId}/groups/{groupId}/blocked-members/{userId}
- GET/accounts/{accountId}/group-links/info
- POST/accounts/{accountId}/group-links/join
- POST/accounts/{accountId}/users/{userId}/invite-to-groups
- POST/accounts/{accountId}/groups/{groupId}/polls
- GET/accounts/{accountId}/polls/{pollId}
- POST/accounts/{accountId}/polls/{pollId}/votes
- POST/accounts/{accountId}/polls/{pollId}/lock
- POST/accounts/{accountId}/polls/{pollId}/options
- POST/accounts/{accountId}/groups/{groupId}/notes
- PATCH/accounts/{accountId}/groups/{groupId}/notes/{noteId}
- GET/accounts/{accountId}/groups/{groupId}/topics
- POST/accounts/{accountId}/groups/{groupId}/topics
- PATCH/accounts/{accountId}/groups/{groupId}/topics/{topicId}
- GET/accounts/{accountId}/groups/{groupId}/topics/{topicId}/messages
- POST/accounts/{accountId}/groups/{groupId}/topics/{topicId}/messages
Nhóm của tài khoản (từ DB, mới hoạt động trước)
GET
/api/v1/accounts/{accountId}/groupsScope: chat:readTham số
accountIdpath · bắt buộc | string max 200 | ID tài khoản (accounts.zalo_id). Facebook dùng Facebook ID, Telegram dùng ID tài khoản Telegram. |
limitquery · tuỳ chọn | integer ≥ 1 · ≤ 200 · default 50 | Số bản ghi tối đa (1–200) |
offsetquery · tuỳ chọn | integer ≥ 0 · default 0 | Bỏ qua N bản ghi đầu |
searchquery · tuỳ chọn | string max 200 |
Lệnh mẫu
bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups" \
-H "Authorization: Bearer dpk_xxx"Tạo nhóm Zalo
POST
/api/v1/accounts/{accountId}/groupsScope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | ID tài khoản (accounts.zalo_id). Facebook dùng Facebook ID, Telegram dùng ID tài khoản Telegram. |
Body (JSON)
namebắt buộc | string max 200 | |
member_idsbắt buộc | string[] max 100 items |
Lệnh mẫu
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"name":"string","member_ids":[]}'Thông tin nhóm từ kênh (thành viên, admin, cài đặt)
GET
/api/v1/accounts/{accountId}/groups/{groupId}Scope: chat:readTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Lệnh mẫu
bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}" \
-H "Authorization: Bearer dpk_xxx"Đổi tên nhóm
PATCH
/api/v1/accounts/{accountId}/groups/{groupId}Scope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Body (JSON)
namebắt buộc | string max 200 |
Lệnh mẫu
bash
curl -X PATCH "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"name":"string"}'Giải tán nhóm (Zalo, cần là trưởng nhóm)
DELETE
/api/v1/accounts/{accountId}/groups/{groupId}Scope: chat:manageKhông thể hoàn tác: bắt buộc ?confirm=true.
Tham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
confirmquery · tuỳ chọn | boolean default false |
Lệnh mẫu
bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}" \
-H "Authorization: Bearer dpk_xxx"Thành viên nhóm (Zalo: danh sách đã lưu; Telegram: lấy từ kênh)
GET
/api/v1/accounts/{accountId}/groups/{groupId}/membersScope: chat:readTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
limitquery · tuỳ chọn | integer ≥ 1 · ≤ 1000 · default 200 |
Lệnh mẫu
bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/members" \
-H "Authorization: Bearer dpk_xxx"Thêm thành viên vào nhóm
POST
/api/v1/accounts/{accountId}/groups/{groupId}/membersScope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Body (JSON)
user_idsbắt buộc | string[] max 50 items |
Lệnh mẫu
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/members" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"user_ids":[]}'Mời một thành viên ra khỏi nhóm
DELETE
/api/v1/accounts/{accountId}/groups/{groupId}/members/{userId}Scope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | |
userIdpath · bắt buộc | string max 200 |
Lệnh mẫu
bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/members/{userId}" \
-H "Authorization: Bearer dpk_xxx"Link mời vào nhóm
GET
/api/v1/accounts/{accountId}/groups/{groupId}/invite-linkScope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Lệnh mẫu
bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/invite-link" \
-H "Authorization: Bearer dpk_xxx"Bật link mời (Zalo)
POST
/api/v1/accounts/{accountId}/groups/{groupId}/invite-linkScope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Lệnh mẫu
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/invite-link" \
-H "Authorization: Bearer dpk_xxx"Tắt link mời (Zalo)
DELETE
/api/v1/accounts/{accountId}/groups/{groupId}/invite-linkScope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Lệnh mẫu
bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/invite-link" \
-H "Authorization: Bearer dpk_xxx"Rời nhóm
POST
/api/v1/accounts/{accountId}/groups/{groupId}/leaveScope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Lệnh mẫu
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/leave" \
-H "Authorization: Bearer dpk_xxx"Cấp quyền quản trị (Zalo: phó nhóm)
POST
/api/v1/accounts/{accountId}/groups/{groupId}/adminsScope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Body (JSON)
user_idbắt buộc | string max 200 |
Lệnh mẫu
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/admins" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"user_id":"string"}'Gỡ quyền quản trị
DELETE
/api/v1/accounts/{accountId}/groups/{groupId}/admins/{userId}Scope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | |
userIdpath · bắt buộc | string max 200 |
Lệnh mẫu
bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/admins/{userId}" \
-H "Authorization: Bearer dpk_xxx"Chuyển quyền trưởng nhóm (Zalo)
POST
/api/v1/accounts/{accountId}/groups/{groupId}/ownerScope: chat:manageBạn sẽ mất quyền trưởng nhóm: bắt buộc confirm: true.
Tham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Body (JSON)
user_idbắt buộc | string max 200 | |
confirmtuỳ chọn | boolean default false |
Lệnh mẫu
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/owner" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"user_id":"string","confirm":false}'Đổi ảnh nhóm (Zalo, Telegram)
PUT
/api/v1/accounts/{accountId}/groups/{groupId}/avatarScope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Body (JSON)
upload_idtuỳ chọn | string | |
library_uuidtuỳ chọn | string | |
urltuỳ chọn | string (uri) |
Lệnh mẫu
bash
curl -X PUT "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/avatar" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"upload_id":"string","library_uuid":"string","url":"https://example.com/file.jpg"}'Cài đặt nhóm Zalo (khoá đổi tên, duyệt thành viên, chỉ admin nhắn…)
GET
/api/v1/accounts/{accountId}/groups/{groupId}/settingsScope: chat:readTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Lệnh mẫu
bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/settings" \
-H "Authorization: Bearer dpk_xxx"Sửa cài đặt nhóm (Zalo; Facebook: chỉ join_approval)
PATCH
/api/v1/accounts/{accountId}/groups/{groupId}/settingsScope: chat:manageChỉ gửi trường cần đổi; các cài đặt khác giữ nguyên (đọc cài đặt hiện tại trước, như bật/tắt từng mục trong app).
Tham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Body (JSON)
block_nametuỳ chọn | boolean | |
sign_admin_msgtuỳ chọn | boolean | |
set_topic_onlytuỳ chọn | boolean | |
enable_msg_historytuỳ chọn | boolean | |
join_approvaltuỳ chọn | boolean | |
lock_create_posttuỳ chọn | boolean | |
lock_create_polltuỳ chọn | boolean | |
lock_send_msgtuỳ chọn | boolean | |
lock_view_membertuỳ chọn | boolean |
Lệnh mẫu
bash
curl -X PATCH "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/settings" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"join_approval":true,"lock_send_msg":false}'Người xin vào nhóm đang chờ duyệt (Zalo)
GET
/api/v1/accounts/{accountId}/groups/{groupId}/pending-membersScope: chat:readTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Lệnh mẫu
bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/pending-members" \
-H "Authorization: Bearer dpk_xxx"Duyệt hoặc từ chối người xin vào nhóm (Zalo, Facebook)
POST
/api/v1/accounts/{accountId}/groups/{groupId}/pending-members/reviewScope: chat:manageXử lý lần lượt từng người như nút "Duyệt tất cả" trong app; results cho biết từng người thành công hay lỗi.
Tham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Body (JSON)
user_idsbắt buộc | string[] max 100 items | |
approvebắt buộc | boolean |
Lệnh mẫu
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/pending-members/review" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"user_ids":[],"approve":false}'Thành viên bị chặn khỏi nhóm (Zalo)
GET
/api/v1/accounts/{accountId}/groups/{groupId}/blocked-membersScope: chat:readTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Lệnh mẫu
bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/blocked-members" \
-H "Authorization: Bearer dpk_xxx"Chặn thành viên khỏi nhóm (Zalo; Telegram/Facebook: mời ra)
POST
/api/v1/accounts/{accountId}/groups/{groupId}/blocked-membersScope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Body (JSON)
user_idbắt buộc | string max 200 |
Lệnh mẫu
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/blocked-members" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"user_id":"string"}'Bỏ chặn thành viên nhóm (Zalo, Telegram bot)
DELETE
/api/v1/accounts/{accountId}/groups/{groupId}/blocked-members/{userId}Scope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | |
userIdpath · bắt buộc | string max 200 |
Lệnh mẫu
bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/blocked-members/{userId}" \
-H "Authorization: Bearer dpk_xxx"Xem nhóm từ link mời (Zalo): tên, số thành viên, trang thành viên
GET
/api/v1/accounts/{accountId}/group-links/infoScope: chat:readTham số
accountIdpath · bắt buộc | string max 200 | ID tài khoản (accounts.zalo_id). Facebook dùng Facebook ID, Telegram dùng ID tài khoản Telegram. |
linkquery · bắt buộc | string max 300 | vd https://zalo.me/g/abcxyz |
pagequery · tuỳ chọn | integer ≥ 1 · ≤ 500 · default 1 |
Lệnh mẫu
bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/group-links/info" \
-H "Authorization: Bearer dpk_xxx"Vào nhóm bằng link mời (Zalo) hoặc username/ID (Telegram)
POST
/api/v1/accounts/{accountId}/group-links/joinScope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | ID tài khoản (accounts.zalo_id). Facebook dùng Facebook ID, Telegram dùng ID tài khoản Telegram. |
Body (JSON)
linkbắt buộc | string max 300 | Zalo: link zalo.me/g/…; Telegram: @username hoặc ID nhóm công khai |
Lệnh mẫu
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/group-links/join" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"link":"string"}'Mời một người vào nhiều nhóm (Zalo)
POST
/api/v1/accounts/{accountId}/users/{userId}/invite-to-groupsScope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | |
userIdpath · bắt buộc | string max 200 | ID người dùng trên kênh |
Body (JSON)
group_idsbắt buộc | string[] max 50 items |
Lệnh mẫu
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/users/{userId}/invite-to-groups" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"group_ids":[]}'Tạo bình chọn trong nhóm (Zalo, Facebook, Telegram bot)
POST
/api/v1/accounts/{accountId}/groups/{groupId}/pollsScope: chat:sendCác tuỳ chọn multiple/allow_add_option/hide_vote_preview/anonymous/expires_at chỉ áp dụng cho Zalo.
Tham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Body (JSON)
questionbắt buộc | string max 300 | |
optionsbắt buộc | string[] max 20 items | |
multipletuỳ chọn | boolean default false | |
allow_add_optiontuỳ chọn | boolean default true | |
hide_vote_previewtuỳ chọn | boolean default false | |
anonymoustuỳ chọn | boolean default false | |
expires_attuỳ chọn | integer ≥ 0 | Epoch ms; bỏ trống = không hết hạn |
Lệnh mẫu
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/polls" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"question":"Chốt lịch họp tuần sau?","options":["Thứ 3","Thứ 5"],"multiple":false}'Chi tiết bình chọn: lựa chọn, số phiếu, người bình chọn (Zalo)
GET
/api/v1/accounts/{accountId}/polls/{pollId}Scope: chat:readTham số
accountIdpath · bắt buộc | string max 200 | |
pollIdpath · bắt buộc | string max 200 |
Lệnh mẫu
bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/polls/{pollId}" \
-H "Authorization: Bearer dpk_xxx"Bình chọn (Zalo, Facebook). Mảng rỗng = huỷ bình chọn (Zalo)
POST
/api/v1/accounts/{accountId}/polls/{pollId}/votesScope: chat:sendTham số
accountIdpath · bắt buộc | string max 200 | |
pollIdpath · bắt buộc | string max 200 |
Body (JSON)
option_idsbắt buộc | integer | string[] max 20 items |
Lệnh mẫu
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/polls/{pollId}/votes" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"option_ids":[]}'Khoá bình chọn (Zalo, người tạo)
POST
/api/v1/accounts/{accountId}/polls/{pollId}/lockScope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | |
pollIdpath · bắt buộc | string max 200 |
Lệnh mẫu
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/polls/{pollId}/lock" \
-H "Authorization: Bearer dpk_xxx"Thêm lựa chọn vào bình chọn (Zalo)
POST
/api/v1/accounts/{accountId}/polls/{pollId}/optionsScope: chat:sendTham số
accountIdpath · bắt buộc | string max 200 | |
pollIdpath · bắt buộc | string max 200 |
Body (JSON)
optionbắt buộc | string max 200 |
Lệnh mẫu
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/polls/{pollId}/options" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"option":"string"}'Tạo ghi chú nhóm (Zalo), tuỳ chọn ghim lên đầu
POST
/api/v1/accounts/{accountId}/groups/{groupId}/notesScope: chat:sendTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Body (JSON)
titlebắt buộc | string max 2000 | |
pintuỳ chọn | boolean default false |
Lệnh mẫu
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/notes" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"title":"string","pin":false}'Sửa ghi chú nhóm (Zalo)
PATCH
/api/v1/accounts/{accountId}/groups/{groupId}/notes/{noteId}Scope: chat:sendTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | |
noteIdpath · bắt buộc | string max 200 | topicId của ghi chú |
Body (JSON)
titlebắt buộc | string max 2000 | |
pintuỳ chọn | boolean default true |
Lệnh mẫu
bash
curl -X PATCH "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/notes/{noteId}" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"title":"string","pin":true}'Chủ đề (forum topic) của siêu nhóm Telegram
GET
/api/v1/accounts/{accountId}/groups/{groupId}/topicsScope: chat:readTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Lệnh mẫu
bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/topics" \
-H "Authorization: Bearer dpk_xxx"Tạo chủ đề (Telegram)
POST
/api/v1/accounts/{accountId}/groups/{groupId}/topicsScope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | ID nhóm (thread_id) |
Body (JSON)
titlebắt buộc | string max 128 | |
icon_colortuỳ chọn | integer ≥ 0 · ≤ 16777215 | |
icon_emoji_idtuỳ chọn | string max 64 |
Lệnh mẫu
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/topics" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"title":"string","icon_color":0,"icon_emoji_id":"string"}'Sửa / đóng / ghim chủ đề (Telegram)
PATCH
/api/v1/accounts/{accountId}/groups/{groupId}/topics/{topicId}Scope: chat:manageTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | |
topicIdpath · bắt buộc | string max 200 | ID topic (root message id) |
Body (JSON)
titletuỳ chọn | string max 128 | |
icon_emoji_idtuỳ chọn | string max 64 | |
closedtuỳ chọn | boolean | |
pinnedtuỳ chọn | boolean |
Lệnh mẫu
bash
curl -X PATCH "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/topics/{topicId}" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"title":"string","icon_emoji_id":"string","closed":false}'Tin mới nhất của một chủ đề, lấy trực tiếp từ Telegram
GET
/api/v1/accounts/{accountId}/groups/{groupId}/topics/{topicId}/messagesScope: chat:readTin đã lưu trong Deplao đọc bằng GET …/conversations/{groupId}/messages?topic_id=.
Tham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | |
topicIdpath · bắt buộc | string max 200 | ID topic (root message id) |
limitquery · tuỳ chọn | integer ≥ 1 · ≤ 100 · default 50 |
Lệnh mẫu
bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/topics/{topicId}/messages" \
-H "Authorization: Bearer dpk_xxx"Gửi tin vào chủ đề (Telegram): chữ hoặc một file
POST
/api/v1/accounts/{accountId}/groups/{groupId}/topics/{topicId}/messagesScope: chat:sendTham số
accountIdpath · bắt buộc | string max 200 | |
groupIdpath · bắt buộc | string max 200 | |
topicIdpath · bắt buộc | string max 200 | ID topic (root message id) |
Body (JSON)
texttuỳ chọn | string max 4096 | Chữ; khi gửi kèm file thì là chú thích |
upload_idtuỳ chọn | string | |
library_uuidtuỳ chọn | string | |
urltuỳ chọn | string (uri) |
Lệnh mẫu
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/groups/{groupId}/topics/{topicId}/messages" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"text":"string","upload_id":"string","library_uuid":"string"}'