Hide/unhide an existing comment on an owned video
POST/business/comment/hide/Gọi qua 360: POST https://partner.quantri360.com/v1/tiktok_business/business/comment/hide/
Endpoint ghi — thay đổi dữ liệu trên TikTok Business. Key phải được tạo với tick "Cho phép gọi API ghi", nếu không sẽ nhận 403 write_not_allowed. Mỗi lần gọi được ghi nhật ký.
Mô tả API
Ẩn hoặc hiện lại một bình luận / phản hồi dưới video tự nhiên của tài khoản (bình luận của người khác chỉ ẩn được, không xóa được).
UNHIDEcó thể không có tác dụng nếu bình luận bị ẩn do kiểm duyệt, cài đặt riêng tư của người dùng hoặc bộ lọc của TikTok — kiểm lạistatusở /business/comment/list/.
Request
Địa chỉ
POST https://partner.quantri360.com/v1/tiktok_business/business/comment/hide/
Xác thực & gian hàng
| Tên | Vị trí | Kiểu | Mẫu | Mô tả |
|---|---|---|---|---|
| Authorization | header | header | Bearer q360_live_ab12cd34_… | Khóa API của brand (tạo ở mục API key). Bắt buộc với mọi request. Brand suy từ key — không truyền mã brand. |
| platform_shop_id | query | string | 7000000000000000001 | Tài sản TikTok Business đã kết nối — "Mã tài sản" ở trang Nền tảng hoặc GET /v1/platforms (tài khoản quảng cáo cho Marketing API, tài khoản TikTok cho Organic / Messaging). Có thể bỏ khi chỉ kết nối một tài sản. |
Tham số request
| Tên | Vị trí | Kiểu | Bắt buộc | Mẫu | Mô tả |
|---|---|---|---|---|---|
| video_id | body | string | Có | 7690000000000000001 | Id video = item_id ở /business/video/list/. |
| comment_id | body | string | Có | 7700000000000000001 | Id bình luận / phản hồi = comment_id ở /business/comment/list/. |
| action | body | string | Có | HIDE | HIDE = ẩn · UNHIDE = hiện lại. |
Ví dụ request
curl -s -X POST "https://partner.quantri360.com/v1/tiktok_business/business/comment/hide/?platform_shop_id=-000AbCdEfGhIjKlMnOpQrStUvWxYz012345" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"video_id":"7690000000000000001","comment_id":"7700000000000000001","action":"HIDE"}'
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.post(
"https://partner.quantri360.com/v1/tiktok_business/business/comment/hide/",
params={
"platform_shop_id": "-000AbCdEfGhIjKlMnOpQrStUvWxYz012345"
},
json={
"video_id": "7690000000000000001",
"comment_id": "7700000000000000001",
"action": "HIDE"
},
headers={"Authorization": f"Bearer {KEY}"},
timeout=60,
)
print(r.status_code)
print(r.json())Node.js
const KEY = 'q360_live_...'; // khóa API của brand
const url = new URL('https://partner.quantri360.com/v1/tiktok_business/business/comment/hide/');
for (const [k, v] of Object.entries({"platform_shop_id":"-000AbCdEfGhIjKlMnOpQrStUvWxYz012345"})) url.searchParams.set(k, typeof v === 'object' ? JSON.stringify(v) : String(v));
const r = await fetch(url, {
method: 'POST',
headers: { Authorization: `Bearer ${KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({"video_id":"7690000000000000001","comment_id":"7700000000000000001","action":"HIDE"}),
});
console.log(r.status, await r.json());PHP
<?php
$key = 'q360_live_...'; // khóa API của brand
$url = 'https://partner.quantri360.com/v1/tiktok_business/business/comment/hide/' . '?' . http_build_query(['platform_shop_id' => '-000AbCdEfGhIjKlMnOpQrStUvWxYz012345']);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key, 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"video_id":"7690000000000000001","comment_id":"7700000000000000001","action":"HIDE"}');
$res = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, "\n", $res;Response
Tham số phản hồi (nguyên của TikTok Business)
Thành công: `code = 0`, `data` rỗng `{}`.
| Tên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| code | int | 0 | 0 = thành công; khác 0 xem `message` (TikTok trả HTTP 200 kèm code lỗi; vd 40002 = tham số sai, message liệt kê giá trị hợp lệ). |
| message | string | OK | Thông điệp của TikTok. |
| request_id | string | 2021080307532501024502410704A7306F | Mã request TikTok — ghi lại khi cần tra lỗi. |
| data | object | Dữ liệu. |
Bắt đầu dùng
- Đăng ký tài khoản Partner
- Mở loại dữ liệu thuộc nhóm Tài khoản TikTok (Organic API) ở trang nền tảng
- Tạo API key (tick kênh TikTok Business)
- Gọi theo ví dụ ở trên