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
| 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 |
|---|---|---|---|---|---|
| identity_type | query | string | Yes | Identity type.
Enum values: AUTH_CODE, TT_USER, BC_AUTH_TT.
See Identities for details. | |
| identity_id | query | string | Yes | Identity ID. To get the identities within an ad account, use /identity/get/. | |
| identity_authorized_bc_id | query | string | No | Required 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_id | query | string | No | Either 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_ids | query | string[] | No | Either 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)
| Name | Type | Sample | Description |
|---|---|---|---|
| code | number | Response code. For the complete list of response codes and descriptions, see Appendix - Return Codes. | |
| message | string | Response message. For details, see Appendix - Return Codes. | |
| request_id | string | The log id of the request, which uniquely identifies a request. | |
| data | object | Returned data. | |
| video_detail | object | Returned when `item_id` is passed in the request. Information about the TikTok post. | |
| item_type | string | The type of TikTok post. Enum values: - `VIDEO`: video post. - `CAROUSEL`: photo post. | |
| item_id | string | TikTok post ID. | |
| status | string | Visibility 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. | |
| text | string | Text for the TikTok post. | |
| anchor_list | object[] | Anchor information. | |
| anchor_id | string | Anchor ID. | |
| title | string | Anchor title. | |
| status | string | Anchor status. Enum values: `CHECKING`, `CHECK_FAILED`, `CHECK_SUCCESS`. | |
| url | string | Anchor URL. | |
| product_regions | string[] | Countries and regions that the ad can be delivered to. This is a list of country or region codes. For example, ` ["DE"]`. | |
| auth_info | object | Returned only when `identity_type` is set to `AUTH_CODE` in the request. Authorization status. | |
| ad_auth_status | string | The authorization status. | |
| auth_start_time | string | Time when the authorization code is valid from (UTC+0), in the format of `"YYYY-MM-DD HH:MM:SS"`. | |
| auth_end_time | string | Time when the authorization code expires (UTC+0), in the format of `"YYYY-MM-DD HH:MM:SS"`. | |
| invite_start_time_stamp | string | The time when the authorization starts (UTC+0), in the format of `"YYYY-MM-DD HH:MM:SS"`. | |
| video_info | object | Information about the video post. Note: When `item_type` is `CAROUSEL`, the value of this field will be null. | |
| bit_rate | integer | Bit rates, in bps. | |
| duration | float | The duration of the video, in seconds. | |
| size | integer | The size of the video, in bytes. | |
| height | integer | The height of the video. | |
| width | integer | The width of the video. | |
| poster_url | string | The 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. | |
| signature | string | The MD5 for the video file. | |
| url | string | Video preview link. Validity period: an hour. When it expires, you need to call the endpoint again to get a new URL. | |
| carousel_info | object | Information about the photo post. Note: When `item_type` is `VIDEO`, the value of this field will be null. | |
| image_info | object[] | 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_id | string | Image ID. | |
| image_url | string | The URL of the image. Validity period: 90 days. | |
| image_height | integer | The height of the image, measured in pixels. | |
| image_width | integer | The width of the image, measured in pixels. | |
| music_info | object | Information 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_id | string | Music ID. | |
| music_url | string | The URL of the music. Validity period: 90 days. | |
| music_duration | integer | The duration of the music, in seconds. | |
| video_details | object[] | Returned when `item_ids` is passed in the request. Information about the TikTok posts. | |
| item_type | string | The type of TikTok post. Enum values: - `VIDEO`: video post. - `CAROUSEL`: photo post. | |
| item_id | string | TikTok post ID. | |
| status | string | Visibility 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. | |
| text | string | Text for the TikTok post. | |
| auth_info | object | Returned only when `identity_type` is set to `AUTH_CODE` in the request. Authorization status. | |
| ad_auth_status | string | The authorization status. | |
| auth_start_time | string | Time when the authorization code is valid from (UTC+0), in the format of `"YYYY-MM-DD HH:MM:SS"`. | |
| auth_end_time | string | Time when the authorization code expires (UTC+0), in the format of `"YYYY-MM-DD HH:MM:SS"`. | |
| invite_start_time_stamp | string | The time when the authorization starts (UTC+0), in the format of `"YYYY-MM-DD HH:MM:SS"`. | |
| video_info | object | Information about the video post. Note: When `item_type` is `CAROUSEL`, the value of this field will be null. | |
| bit_rate | integer | Bit rates, in bps. | |
| duration | float | The duration of the video, in seconds. | |
| size | integer | The size of the video, in bytes. | |
| height | integer | The height of the video. | |
| width | integer | Width of the video. | |
| poster_url | string | 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. | |
| signature | string | The MD5 for the video file. | |
| url | string | Video preview link. Validity period: an hour. When it expires, you need to call the endpoint again to get a new URL. | |
| carousel_info | object | Information about the photo post. Note: When `item_type` is `VIDEO`, the value of this field will be null. | |
| image_info | object[] | 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_id | string | Image ID. | |
| image_url | string | The URL of the image. Validity period: 90 days. | |
| image_height | integer | The height of the image, measured in pixels. | |
| image_width | integer | The width of the image, measured in pixels. | |
| music_info | object | Information 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_id | string | Music ID. | |
| music_url | string | The URL of the music. Validity period: 90 days. | |
| music_duration | integer | The 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
- 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