← 返回目录
📁 API Reference › Ad Comments

回复评论

您可以使用本接口回复评论。

绑定以下两类认证身份,并且拥有评论管理权限的广告主可以回复已有的一级评论: - 自定义用户 (CUSTOMIZED_USER) - TikTok 用户(TT_USER)

v1.2与v1.3版本对比

以下表格概括了 v1.2与v1.3接口的变化。 ``xtable |变化内容{30%}|v1.2{35%}|v1.3{35%}| |---|---|---| |接口路径| /v1.2/comment/post/ | /v1.3/comment/post/ | |请求参数类型|advertiser_id: number <br>comment_id: number<br>ad_id: number |advertiser_id: string<br>comment_id: string<br>ad_id: string| |请求参数名称和类型|item_id: number |tiktok_item_id: string | |返回参数类型 |comment_id: number<br>reply_to_comment_id: number |comment_id: string<br>reply_to_comment_id: string | |返回参数名称和类型|item_id: number |tiktok_item_id: string | |废弃返回参数|/ |identity_type`(in data) |


## 请求

**地址**
https://business-api.tiktok.com/open_api/v1.3/comment/post/

**方法** POST

**Header**

```xtable
|字段|类型|描述|
|---|---|---|
|Access-Token {必填}|string|授权访问令牌。可以通过[获取访问令牌](https://ads.tiktok.com/marketing_api/docs?id=1738373164380162)接口获取。|
|Content-Type {必填}|string|请求信息类型<br>允许格式:`application/json`。|

参数

|字段|类型|描述|
|---|---|---|
|advertiser_id {必填}|string| 广告主 ID。 |
| ad_id {必填} | string | 广告 ID。 |
| tiktok_item_id {必填} | string |TikTok 视频 ID。|
| comment_id {必填} | string | 您想要回复的评论 ID。 |
| comment_type {必填} | string | 评论类型。目前仅支持 `REPLY`。|
| text  {必填} | string | 回复内容。 |
|identity_type {必填} |string|认证身份类型。<br><br>枚举值:`CUSTOMIZED_USER` (自定义用户), `TT_USER`(TikTok 用户)。<br><br>关于认证身份的更多信息,请访问[认证身份](https://ads.tiktok.com/marketing_api/docs?id=1738958351620097)。|
| identity_id {必填} | string |认证身份 ID。 |

示例

(code curl http)
curl -H "Access-Token:xxx" -H "Content-Type:application/json" -X POST \
-d '{
    "advertiser_id": "ADVERTISER_ID",
    "ad_id": "AD_ID",
    "tiktok_item_id": "TIKTOK_ITEM_ID",
    "comment_id": "COMMENT_ID",
    "comment_type": "COMMENT_TYPE",
    "text": "TEXT",
    "identity_type": "IDENTITY_TYPE",
    "identity_id": "IDENTITY_ID"
}' \
https://business-api.tiktok.com/open_api/v1.3/comment/post/
(/code)

返回

|字段|类型|描述|
|---|---|---|
|code |number|返回码,详见[附录-返回码](https://ads.tiktok.com/marketing_api/docs?id=1737172488964097)|
|message |string|返回信息,详见[附录-返回码](https://ads.tiktok.com/marketing_api/docs?id=1737172488964097)|
|data |object|返回数据。  |
#|comment_id |string| 评论 ID。 |
#|tiktok_item_id|string|TikTok 视频 ID。|
#| text | string |  评论或回复内容。 |
#| create_time | string | 评论或回复的创建时间(UTC+0), 格式为`YYYY-MM-DD HH:MM:SS`。 |
#| reply_to_comment_id |string |回复的原始评论 ID。|
|request_id |string|请求的日志 ID,唯一标识一个请求。 |

示例

(code Success-Response http)
HTTPS/1.1 200 OK
{
    "message": "OK",
    "code": 0,
    "data": {
        "comment_id": "7122941661025993518",
        "text": "Hello word",
        "reply_to_comment_id": "7122941661025993510",
        "item_id": 0,
        "create_time": "2022-06-07"
    }
}
(/code)

内容来源:TikTok API for Business 官方文档 · 本地归档

在接这个接口时卡住了?
Stuck wiring this API into production? We build ad-delivery tooling on these platforms — campaign automation, reporting pipelines, error-handling and migration between API versions.
联系我们 · Talk to us 每日平台更新简报 →