VI | EN
Message us on Messenger
Developer resources

Get info about TikTok posts — TikTok Business API

Get info about TikTok posts · 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 info about TikTok posts

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

Use this endpoint to get the information about one or more TikTok posts that you published using the AUTH_CODE, TT_USER or BC_AUTH_TT identity.

Request

Endpoint

GET https://partner.quantri360.com/v1/tiktok_business/identity/video/info/

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_typequerystringYesIdentity type. Enum values: AUTH_CODE, TT_USER, BC_AUTH_TT. See Identities for details.
identity_idquerystringYesIdentity ID. To get the identities within an ad account, use /identity/get/.
identity_authorized_bc_idquerystringNoRequired when identity_type is BC_AUTH_TT. ID of the Business Center that a TikTok Account User in Business Center identity is associated with.
item_idquerystringNoEither item_id or item_ids must be specified. - If you want to retrieve the information for a single TikTok post, pass item_id. - If you want to retrieve the information for multiple TikTok posts, pass item_ids. The TikTok post ID that is associated with the provided Identity ID (identity_id). To get the TikTok posts associated with an identity, use /identity/video/get/ and extract the TikTok post ID (item_id) from the response.
item_idsquerystring[]NoEither item_id or item_ids must be specified. - If you want to retrieve the information for a single TikTok post, pass item_id. - If you want to retrieve the information for multiple TikTok posts, pass item_ids. A list of TikTok post IDs that are associated with the provided Identity ID (identity_id). Max size: 20. To get the TikTok posts associated with an identity, use /identity/video/get/ and extract the TikTok post ID (item_id) from the response.

Request examples

curl -s "https://partner.quantri360.com/v1/tiktok_business/identity/video/info/?identity_type=&identity_id=" \
  -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/video/info/",
    params={
        "identity_type": "",
        "identity_id": ""
    },
    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/video/info/');
for (const [k, v] of Object.entries({"identity_type":"","identity_id":""})) 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/video/info/' . '?' . http_build_query(['identity_type' => '', 'identity_id' => '']);
$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
codenumberResponse code. For the complete list of response codes and descriptions, see Appendix - Return Codes.
messagestringResponse message. For details, see Appendix - Return Codes.
request_idstringThe log id of the request, which uniquely identifies a request.
dataobjectReturned data.
video_detailobjectReturned when `item_id` is passed in the request. Information about the TikTok post.
item_typestringThe type of TikTok post. Enum values: - `VIDEO`: video post. - `CAROUSEL`: photo post.
item_idstringTikTok post ID.
statusstringVisibility status of the TikTok post. Enum values: - `ITEM_STATUS_HESITATE_RECOMMEND`: visible to all. - `STATUS_ONLY_FRIEND_SEE`: visible to friends. - `ITEM_STATUS_ONLY_AUTHOR_SEE`: private.
textstringText for the TikTok post.
anchor_listobject[]Anchor information.
anchor_idstringAnchor ID.
titlestringAnchor title.
statusstringAnchor status. Enum values: `CHECKING`, `CHECK_FAILED`, `CHECK_SUCCESS`.
urlstringAnchor URL.
product_regionsstring[]Countries and regions that the ad can be delivered to. This is a list of country or region codes. For example, ` ["DE"]`.
auth_infoobjectReturned only when `identity_type` is set to `AUTH_CODE` in the request. Authorization status.
ad_auth_statusstringThe authorization status.
auth_start_timestringTime when the authorization code is valid from (UTC+0), in the format of `"YYYY-MM-DD HH:MM:SS"`.
auth_end_timestringTime when the authorization code expires (UTC+0), in the format of `"YYYY-MM-DD HH:MM:SS"`.
invite_start_time_stampstringThe time when the authorization starts (UTC+0), in the format of `"YYYY-MM-DD HH:MM:SS"`.
video_infoobjectInformation about the video post. Note: When `item_type` is `CAROUSEL`, the value of this field will be null.
bit_rateintegerBit rates, in bps.
durationfloatThe duration of the video, in seconds.
sizeintegerThe size of the video, in bytes.
heightintegerThe height of the video.
widthintegerThe width of the video.
poster_urlstringThe URL to the video poster. The expiration time is included in the URL after the `x-expires` parameter, in the format of an Epoch/Unix timestamp in seconds. When it expires, you need to call this endpoint to get a new URL.
signaturestringThe MD5 for the video file.
urlstringVideo preview link. Validity period: an hour. When it expires, you need to call the endpoint again to get a new URL.
carousel_infoobjectInformation about the photo post. Note: When `item_type` is `VIDEO`, the value of this field will be null.
image_infoobject[]Information about the images used in the photo post. The images are returned in the same order as they are shown in the photo post.
image_idstringImage ID.
image_urlstringThe URL of the image. Validity period: 90 days.
image_heightintegerThe height of the image, measured in pixels.
image_widthintegerThe width of the image, measured in pixels.
music_infoobjectInformation about the music used in the photo post. Note: If the photo post is directly published in the TikTok App without music, the value of this field will be null.
music_idstringMusic ID.
music_urlstringThe URL of the music. Validity period: 90 days.
music_durationintegerThe duration of the music, in seconds.
video_detailsobject[]Returned when `item_ids` is passed in the request. Information about the TikTok posts.
item_typestringThe type of TikTok post. Enum values: - `VIDEO`: video post. - `CAROUSEL`: photo post.
item_idstringTikTok post ID.
statusstringVisibility status of the TikTok post. Enum values: - `ITEM_STATUS_HESITATE_RECOMMEND`: visible to all. - `ITEM_STATUS_ONLY_AUTHOR_SEE`: visible to friends. - `STATUS_ONLY_FRIEND_SEE`: private.
textstringText for the TikTok post.
auth_infoobjectReturned only when `identity_type` is set to `AUTH_CODE` in the request. Authorization status.
ad_auth_statusstringThe authorization status.
auth_start_timestringTime when the authorization code is valid from (UTC+0), in the format of `"YYYY-MM-DD HH:MM:SS"`.
auth_end_timestringTime when the authorization code expires (UTC+0), in the format of `"YYYY-MM-DD HH:MM:SS"`.
invite_start_time_stampstringThe time when the authorization starts (UTC+0), in the format of `"YYYY-MM-DD HH:MM:SS"`.
video_infoobjectInformation about the video post. Note: When `item_type` is `CAROUSEL`, the value of this field will be null.
bit_rateintegerBit rates, in bps.
durationfloatThe duration of the video, in seconds.
sizeintegerThe size of the video, in bytes.
heightintegerThe height of the video.
widthintegerWidth of the video.
poster_urlstringURL to the video poster. The expiration time is included in the URL after the `x-expires` parameter, in the format of an Epoch/Unix timestamp in seconds. When it expires, you need to call this endpoint to get a new URL.
signaturestringThe MD5 for the video file.
urlstringVideo preview link. Validity period: an hour. When it expires, you need to call the endpoint again to get a new URL.
carousel_infoobjectInformation about the photo post. Note: When `item_type` is `VIDEO`, the value of this field will be null.
image_infoobject[]Information about the images used in the photo post. The images are returned in the same order as they are shown in the photo post.
image_idstringImage ID.
image_urlstringThe URL of the image. Validity period: 90 days.
image_heightintegerThe height of the image, measured in pixels.
image_widthintegerThe width of the image, measured in pixels.
music_infoobjectInformation about the music used in the photo post. Note: If the photo post is directly published in the TikTok App without music, the value of this field will be null.
music_idstringMusic ID.
music_urlstringThe URL of the music. Validity period: 90 days.
music_durationintegerThe duration of the music, in seconds.

Response sample

HTTPS/1.1 200 OK
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "video_detail": {
            "auth_info": null,
            "anchor_list": null,
            "item_id": "{{item_id}}",
            "text": "",
            "status": "ITEM_STATUS_HESITATE_RECOMMEND",
            "video_info": {
                "duration": 1.6,
                "width": 720,
                "url": "{{url}}",
                "size": 244797,
                "bit_rate": 1223985,
                "height": 1280,
                "poster_url": "{{poster_url}}",
                "format": "mp4",
                "signature": "{{signature}}"
            }
        }
    }
}

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