VI | EN
Message us on Messenger
Developer resources

Get the identity list — TikTok Business API

Get the identity list · 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 the identity list

GET/identity/get/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/identity/get/
Description

Danh tính (tài khoản TikTok / danh tính tùy chỉnh) dùng được để chạy quảng cáo trên tài khoản quảng cáo, kèm các quyền của từng danh tính (lấy video, chạy LIVE, quản lý tin nhắn, dùng Showcase…).

  • Danh tính dùng cho chiến dịch GMV Max xem ở /gmv_max/identity/get/ (theo gian hàng).

Request

Endpoint

GET https://partner.quantri360.com/v1/tiktok_business/identity/get/

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
identity_typequerystringNoTT_USERCUSTOMIZED_USER (danh tính tùy chỉnh) · AUTH_CODE (qua mã ủy quyền bài) · TT_USER (tài khoản TikTok) · BC_AUTH_TT (tài khoản TikTok qua Business Center). Không gửi = mọi loại. Khi không gửi hoặc gửi BC_AUTH_TT, page_info trả toàn số 0 — đếm theo số dòng identity_list thay vì total_number.
identity_authorized_bc_idquerystringNoBắt buộc khi identity_type = BC_AUTH_TT: id Business Center gắn với danh tính.
filteringqueryobjectNo{"keyword":"thuonghieu"}Chuỗi JSON {keyword} — tìm theo tên hiển thị, chỉ có tác dụng với CUSTOMIZED_USER hoặc khi không gửi identity_type.
pagequeryintNo1Trang, mặc định 1.
page_sizequeryintNo100Số dòng mỗi trang: 1–100, mặc định 20.

Pagination

Lặp page = 1, 2, … tới khi page ≥ data.page_info.total_page.

Request examples

curl -s "https://partner.quantri360.com/v1/tiktok_business/identity/get/?platform_shop_id=7000000000000000001&identity_type=TT_USER&page_size=100" \
  -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/identity/get/",
    params={
        "platform_shop_id": "7000000000000000001",
        "identity_type": "TT_USER",
        "page_size": 100
    },
    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/identity/get/');
for (const [k, v] of Object.entries({"platform_shop_id":"7000000000000000001","identity_type":"TT_USER","page_size":100})) 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/identity/get/' . '?' . http_build_query(['platform_shop_id' => '7000000000000000001', 'identity_type' => 'TT_USER', 'page_size' => 100]);
$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
codeint00 = 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ệ).
messagestringOKThông điệp của TikTok.
request_idstring2021080307532501024502410704A7306FMã request TikTok — ghi lại khi cần tra lỗi.
dataobjectDữ liệu.
identity_listobject[]Danh tính.
identity_idstring7000000000000000002Id danh tính.
identity_typestringTT_USERLoại danh tính.
identity_authorized_bc_idstringBusiness Center gắn với danh tính (loại `BC_AUTH_TT`).
display_namestringThương hiệu mẫuTên hiển thị.
usernamestringthuonghieu.officialTên người dùng.
profile_imagestringẢnh đại diện.
available_statusstringAVAILABLEChỉ `TT_USER` / `BC_AUTH_TT`: `AVAILABLE` · `NO_VALID_BIND_ACCOUNT` · `SCOPE_UNAVAILABLE` · `IS_PRIVATE_ACCOUNT` · `NOT_BUSINESS_ACCOUNT`.
can_pull_videobooltrueLấy được video của tài khoản.
can_push_videobooltrueTạo / sửa được video.
can_use_live_adsboolfalseChạy được quảng cáo LIVE.
can_manage_messageboolfalseQuản lý được tin nhắn.
can_use_showcaseboolfalseDùng được sản phẩm từ Showcase.
can_use_seriesboolfalseDùng được TikTok Series.
ads_only_modeboolChỉ `BC_AUTH_TT`: `true` = bài chỉ hiển thị qua quảng cáo.
is_gpppaboolfalse`true` = tài khoản chính phủ / chính trị — không dùng được cho Spark Ads.
page_infoobjectPhân trang.
pageint1Trang hiện tại.
page_sizeint100Số dòng mỗi trang.
total_numberint35Tổng số dòng.
total_pageint1Tổng số trang.

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