Get related comments
GET/comment/reference/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/comment/reference/
Description
Use this endpoint to get related comments.
For an original comment, you can get the comment itself and all of its replies. For a reply, you can get the reply and its original comment.
Request
Endpoint
GET https://partner.quantri360.com/v1/tiktok_business/comment/reference/
Authentication & shop
| Name | In | Type | Sample | Description |
|---|---|---|---|---|
| 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. |
Request parameters
| Name | In | Type | Required | Sample | Description |
|---|---|---|---|---|---|
| comment_id | query | string | Yes | Comment ID. | |
| comment_type | query | string | Yes | Comment type. It can be COMMENT, which is an original comment, or REPLY, which is a reply to an original comment. | |
| original_comment_id | query | string | No | ID of the original comment. A value will be returned only when comment_type is REPLY`. | |
| page_size | query | number | No | Page size.
Value range: 1-1000.
Default value: 10. | |
| page | query | number | No | Current page number. Value range: ≥ 1. Default value: 1. |
Request examples
curl -s "https://partner.quantri360.com/v1/tiktok_business/comment/reference/?comment_id=&comment_type=" \ -H "Authorization: Bearer $KEY"
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.get(
"https://partner.quantri360.com/v1/tiktok_business/comment/reference/",
params={
"comment_id": "",
"comment_type": ""
},
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/comment/reference/');
for (const [k, v] of Object.entries({"comment_id":"","comment_type":""})) url.searchParams.set(k, typeof v === 'object' ? JSON.stringify(v) : String(v));
const r = await fetch(url, {
method: 'GET',
headers: { Authorization: `Bearer ${KEY}` },
});
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/comment/reference/' . '?' . http_build_query(['comment_id' => '', 'comment_type' => '']); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key]); $res = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo $status, "\n", $res;
Response
Response fields (as returned by TikTok Business)
| Name | Type | Sample | Description |
|---|---|---|---|
| message | string | The return message. For Details, see Appendix - Return Codes. | |
| code | number | The return code. For details, see Appendix-Return Code. | |
| data | object | The returned data. | |
| comments | object[] | List of comments. | |
| comment_id | string | Comment ID. | |
| content | string | Comment content. | |
| comment_type | string | Comment type. It can be `COMMENT`, which is an original comment, or `REPLY`, which is a reply to an original comment. | |
| comment_status | string | Comment status. Enum values: `HIDDEN`, `PUBLIC`. | |
| hit_blockedword | boolean | Whether the comment contains blocked words. | |
| create_time | string | The time when the comment is created. | |
| user_name | string | User who made the comment. | |
| user_id | string | The ID of the TikTok user who made the comment. Example: `"6123456789123456789"`. | |
| user_avatar_url | string | URL to the users' avatar. | |
| tiktok_item_id | string | TikTok video ID. | |
| identity_id | string | Identity ID. | |
| identity_type | string | Identity type. `CUSTOMIZED_USER` (Customized User), `TT_USER` (TikTok Business Account User). For details about identities, see Identities. | |
| is_pinned | boolean | Whether the comment is pinned. | |
| can_delete | boolean | Whether the comment can be deleted. | |
| is_auth_ttba | boolean | Whether the user is linked to a TikTok Business Account. | |
| is_auth_comment_manage_scope | boolean | Whether the user has the comment management permission. | |
| reply_user_info | object | Information about the user who posted the original comment. Valid only for replies (second-level or lower comments). Returns null for first-level comments. | |
| page_info | object | Page information. | |
| page | number | Current page number. | |
| page_size | number | Page size. | |
| total_number | number | Total number of results. | |
| total_page | number | Total number of pages. | |
| request_id | string | Unique ID of the request. |
Response sample
HTTPS/1.1 200 OK
{
"message": "OK",
"code": 0,
"data": {}
}
(/code);
Get started
- Sign up for Partner
- Enable a data type of the Ads (Marketing API) group on the platform page
- Create an API key (tick the TikTok Business channel)
- Call it as in the examples above