获取认证身份下直播视频
您可以使用本接口获取一个认证身份下的所有直播视频。
请求
地址 https://business-api.tiktok.com/open_api/v1.3/identity/live/get/
方法 GET
Header
|字段|类型|描述|
|---|---|---|
|Access-Token {必填}|string|授权访问令牌。可以通过[获取访问令牌](https://ads.tiktok.com/marketing_api/docs?id=1738373164380162)接口获取。|
|Content-Type {必填}|string|请求信息类型。<br>允许格式:`application/json`。|
参数
| 字段 | 类型 | 描述 |
|---|---|---|
| advertiser_id {必填} | string | 广告主ID。 |
| identity_id {必填} | string | 认证身份ID。 |
| identity_type {必填} | string | 认证身份类型。 枚举值: `TT_USER`,`BC_AUTH_TT`。获取更多相关信息,请访问认证身份。 |
| identity_authorized_bc_id {+条件必填} | string | 当`identity_type`为`BC_AUTH_TT`时必填。 与添加到商务中心的TikTok用户这一认证身份绑定的商务中心的ID。 |
| cursor | number | 时间戳游标。返回某时间戳值之前的直播视频。 第一次请求可设置为`0`。将返回`has_more` 标记和`cursor`。如果`has_more`为`true`,使用`cursor`来获取之后的页面数据。 |
示例
(code curl http)
curl --location --request GET 'https://business-api.tiktok.com/open_api/v1.3/identity/live/get/?advertiser_id={{advertiser_id}}&identity_type=TT_USER&identity_id={{identity_id}' \
--header 'Access-Token: {{Access-Token}}'
(/code)
返回
| Field | Data Type | Description |
|---|---|---|
| code | number | 返回码。完整返回码列表及描述,可查看[附录 - 返回代码](https://ads.tiktok.com/marketing_api/docs?id=1737172488964097)。 |
| message | string | 返回信息。更多信息可查看[附录 - 返回代码](https://ads.tiktok.com/marketing_api/docs?id=1737172488964097)。 |
| request_id | string | 请求的日志 ID,唯一标识一个请求。 |
| data | object | 返回数据。 |
#| cursor | string | 时间戳游标。 当前请求返回的最后一项的时间值。您需要在后续请求中使用此游标值来获取下一个直播视频。 |
#| has_more | bool | 是否有更多数据。 |
#| live_list | object[] | 直播视频列表。 |
##|live_id | string | 视频列表ID。 |
##| finish_timestamp | string | 直播视频结束时间戳。 示例:`2023-12-07 08:13:44`。 |
示例
(code curl http)
HTTPS/1.1 200 OK
{
"code": 0,
"message": "OK",
"request_id": "{{request_id}}",
"data": {
"live_list": [
{
"live_id": "{{live_id}}",
"finish_timestamp": "2023-12-07 12:41:27"
}
],
"cursor": "1686195429",
"has_more": true
}
}
(/code)