Get posts under an identity
GET/identity/video/get/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/identity/video/get/
Description
Use this endpoint to get all posts under an identity.
Request
Endpoint
GET https://partner.quantri360.com/v1/tiktok_business/identity/video/get/
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_id | query | string | Yes | Identity ID. | |
| identity_type | query | string | Yes | Identity type. Enum values: AUTH_CODE, TT_USER, BC_AUTH_TT. See Identities for details. | |
| identity_authorized_bc_id | query | string | No | ID of the Business Center that a TikTok Account User in Business Center identity is associated with. Required when identity_type is BC_AUTH_TT. | |
| item_type | query | string | No | The type of TikTok posts that you want to retrieve.
Enum values:
- VIDEO: video post.
- CAROUSEL: photo post.
Default value: VIDEO. | |
| keyword | query | string | No | Valid only when identity_type is set to AUTH_CODE. Otherwise, an error will occur.
The text or TikTok post ID as a keyword to search TikTok posts by.
- If you want to search for TikTok posts based on text, provide a text string with a maximum length of 500 characters. This search type supports searching in multiple languages and fuzzy matches.
Example: "summer".
- If you want to search for TikTok posts based on item_id, provide a numeric string with a minimum length of 19 characters. This search type supports exact matches.
Example: "1234567891234567891" | |
| exclude_adsonly | query | boolean | No | Whether to exclude ads only posts from the results.
Ads-only posts are those you publish from a TikTok account as ads, which remain hidden from the public on the account's profile page.
Supported values:
- false: To retrieve both organic and ads only posts.
- true: To retrieve a maximum of 500 most recent organic posts.
Default value: false. | |
| cursor | query | integer | No | Cursor for pagination. | |
| count | query | number | No | Number of TikTok posts you want to get. Value range: 1-20. If you specify a value greater than 20, this field will be ignored and a maximum of 20 TikTok posts associated with the identity will be returned. |
Request examples
curl -s "https://partner.quantri360.com/v1/tiktok_business/identity/video/get/?identity_id=&identity_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/identity/video/get/",
params={
"identity_id": "",
"identity_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/identity/video/get/');
for (const [k, v] of Object.entries({"identity_id":"","identity_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/identity/video/get/' . '?' . http_build_query(['identity_id' => '', 'identity_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 |
|---|---|---|---|
| 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. | |
| data | object | Returned data. | |
| cursor | string | Timestamp cursor or cursor for pagination. - If `identity_type` is `TT_USER` or `BC_AUTH_TT` : - When `exclude_adsonly` is `false` in the request, `cursor` is the time value of the last item returned according to the current request. You need to use this cursor value in your subsequent request to get the next posts. - When `exclude_adsonly` is `true` in the request, `cursor` is the cursor for pagination. If `has_more` in the response is `true`, you need to use the returned `cursor` in the subsequent request to receive the next page of results. - If `identity_type` is `AUTH_CODE`, `cursor` is the cursor for pagination. If `has_more` in the response is `true`, you need to use the returned `cursor` in the subsequent request to receive the next page of results. | |
| has_more | bool | Whether more data is available. | |
| video_list | object[] | List of 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 | 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. | |
| auth_info | object | Authorization Information. | |
| ad_auth_status | string | Authorization status. | |
| auth_end_time | string | Time when the authorization code is valid from (UTC+0), in the format of 2017-01-01 00:00:00. | |
| auth_start_time | string | Time when the authorization code is valid from (time zone: UTC+0), in the format of 2017-01-01 00:00:00. | |
| invite_start_time | string | The time when the authorization starts (UTC+0), in the format of 2017-01-01 00:00:00. | |
| anchor_list | object | Information about anchors. | |
| anchor_id | string | Anchor ID. | |
| title | string | Anchor title. | |
| status | string | Anchor status. Enum values: `CHECK_ING`, `CHECK_FAILED`, `CHECK_SUCCESS`. | |
| url | string | Anchor URL. | |
| product_regions | string[] | Regions that the ad can be delivered to. This is a list of country or region codes. For example, `["DE"]`. | |
| 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 | Duration of the video, in seconds. | |
| size | integer | Video size, in bytes. | |
| height | integer | Video height. | |
| width | integer | Video width. | |
| 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 | MD5 for the video file. | |
| url | string | Video preview link. It is valid for an hour. When it expires, you need to call the endpoint again to get a new URL. | |
| format | string | Format of the video. | |
| 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. | |
| request_id | string | The log id of the request, which uniquely identifies a request. |
Response sample
HTTPS/1.1 200 OK
{
"code": 0,
"message": "OK",
"request_id": "{{request_id}}",
"data": {
"cursor": "1780432720000",
"has_more": true,
"video_list": [
{
"anchor_list": null,
"auth_info": null,
"carousel_info": null,
"item_id": "{{item_id}}",
"item_type": "VIDEO",
"status": "ITEM_STATUS_HESITATE_RECOMMEND",
"text": "{{text}}",
"video_info": {
"bit_rate": 15184988,
"duration": 13.8,
"format": "mp4",
"height": 1920,
"poster_url": "{{poster_url}}",
"signature": "{{signature}}",
"size": 26194106,
"url": "{{url}}",
"width": 1080
}
},
{
"anchor_list": null,
"auth_info": null,
"carousel_info": null,
"item_id": "{{item_id}}",
"item_type": "VIDEO",
"status": "ITEM_STATUS_HESITATE_RECOMMEND",
"text": "{{text}}",
"video_info": {
"bit_rate": 990999,
"duration": 16,
"format": "mp4",
"height": 1280,
"poster_url": "{{poster_url}}",
"signature": "{{signature}}",
"size": 1981998,
"url": "{{url}}",
"width": 720
}
}
]
}
}
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