VI | EN
Message us on Messenger
Developer resources

Get related comments — TikTok Business API

Get related comments · call it through Quantri360 with one API key for your own accounts / assets that you connected and authorized — 360 handles request signing and refreshing the authorization you granted.

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

NameInTypeSampleDescription
AuthorizationheaderheaderBearer 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_idquerystring7000000000000000001Tà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

NameInTypeRequiredSampleDescription
comment_idquerystringYesComment ID.
comment_typequerystringYesComment type. It can be COMMENT, which is an original comment, or REPLY, which is a reply to an original comment.
original_comment_idquerystringNoID of the original comment. A value will be returned only when comment_type is REPLY`.
page_sizequerynumberNoPage size. Value range: 1-1000. Default value: 10.
pagequerynumberNoCurrent 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)

NameTypeSampleDescription
messagestringThe return message. For Details, see Appendix - Return Codes.
codenumberThe return code. For details, see Appendix-Return Code.
dataobjectThe returned data.
commentsobject[]List of comments.
comment_idstringComment ID.
contentstringComment content.
comment_typestringComment type. It can be `COMMENT`, which is an original comment, or `REPLY`, which is a reply to an original comment.
comment_statusstringComment status. Enum values: `HIDDEN`, `PUBLIC`.
hit_blockedwordbooleanWhether the comment contains blocked words.
create_timestringThe time when the comment is created.
user_namestringUser who made the comment.
user_idstringThe ID of the TikTok user who made the comment. Example: `"6123456789123456789"`.
user_avatar_urlstringURL to the users' avatar.
tiktok_item_idstringTikTok video ID.
identity_idstringIdentity ID.
identity_typestringIdentity type. `CUSTOMIZED_USER` (Customized User), `TT_USER` (TikTok Business Account User). For details about identities, see Identities.
is_pinnedbooleanWhether the comment is pinned.
can_deletebooleanWhether the comment can be deleted.
is_auth_ttbabooleanWhether the user is linked to a TikTok Business Account.
is_auth_comment_manage_scopebooleanWhether the user has the comment management permission.
reply_user_infoobjectInformation about the user who posted the original comment. Valid only for replies (second-level or lower comments). Returns null for first-level comments.
page_infoobjectPage information.
pagenumberCurrent page number.
page_sizenumberPage size.
total_numbernumberTotal number of results.
total_pagenumberTotal number of pages.
request_idstringUnique ID of the request.

Response sample

HTTPS/1.1 200 OK
{
    "message": "OK",
    "code": 0,
    "data": {}
}
(/code);

Get started

  1. Sign up for Partner
  2. Enable a data type of the Ads (Marketing API) group on the platform page
  3. Create an API key (tick the TikTok Business channel)
  4. Call it as in the examples above