← 返回目录
📁 API Reference › Mentions

Reply to a mention in comments

您可以使用本接口回复提及企业用户名的视频评论或回复。

请求

地址 https://business-api.tiktok.com/open_api/v1.3/business/comment/reply/create/

方法 POST

所需权限 comment.list.manage

Header

|字段{30%}|类型{15%}|描述{55%}|
|---|---|---|
|Access-Token {必填}|string|经 TikTok 企业号授权的访问令牌。<br><br>若想获取访问令牌,需使用[/tt_user/oauth2/token/](https://bytedance.feishu.cn/docx/SEHOdMlGuo4Qd8xKNwfuKAWks9f#doxusGgroRlGjFKpRNHLbVlmMne)。|
|Content-Type {必填}|string|请求信息类型。<br><br>允许格式:`application/json`。|

参数

|字段{30%}|类型{15%}|描述{55%}|
|---|---|---|
|business_id {必填}|string|TikTok 企业号的应用唯一识别 ID。<br><br>您可通过[/tt_user/oauth2/token/](https://bytedance.feishu.cn/docx/SEHOdMlGuo4Qd8xKNwfuKAWks9f#doxusGgroRlGjFKpRNHLbVlmMne)中返回的`open_id`字段获取该 ID。|
|video_id {必填}|string|视频的唯一标识符,即您想要创建的回复对应的视频。<br><br>您可通过[/business/mention/comment/list/](https://bytedance.larkoffice.com/docx/SEHOdMlGuo4Qd8xKNwfuKAWks9f#doxus3tklFkhcwxeDzC609MnPAh)中返回的`item_id`字段获取`video_id`。|
|comment_id {必填}|string|您想要回复的评论的唯一标识符。<br><br>您可通过[/business/mention/comment/list/](https://bytedance.larkoffice.com/docx/SEHOdMlGuo4Qd8xKNwfuKAWks9f#doxus3tklFkhcwxeDzC609MnPAh)中返回的`comment_id`字段获取`comment_id`。|
|text {必填}|string|要创建的回复的文本内容。<br><br>长度限制: 1,200 个字符(UTF-8编码)。<br><br>示例: `"This is a comment #comment 🙂"`.|

示例

(code curl http)
curl --location  --request POST 'https://business-api.tiktok.com/open_api/v1.3/business/comment/reply/create/' \
--header 'Access-Token: {{Access-Token}}' \
--header 'Content-Type: application/json' \
--data '{
    "business_id" : "{{business_id}}",
    "video_id": "{{video_id}}",
    "comment_id" : "{{comment_id}}",
    "text": "{{text}}"
}'
(/code)

返回

|字段{30%}|类型{15%}|描述{55%}|
|---|---|---|
|code|number|返回码。完整返回码列表及描述,可见[附录 - 返回码](1737172488964097.html)。|
|message|string|返回信息。更多信息可见[附录 - 返回码](1737172488964097.html)。|
|request_id|string|请求的日志 ID,唯一标识一个请求。|
|data|object|返回数据。|
#|comment_id|string|新建回复的唯一标识符。<br><br>示例: `6990565363377392901`.|
#|parent_comment_id|string|回复的评论的唯一标识符。<br><br>示例: `6990565363377392901`.|
#|video_id|string|回复对应的视频的唯一标识符。<br><br>示例: `6990565363377392901`.|
#|user_id|string|发表回复的用户在开发者应用和 TikTok 账户范围内的唯一标识符。<br><br>示例: `ce9b7be629b0447af777a0ad945783f61b7f790982b49fbda04a23b4722eaffe`.|
#|create_time|integer|回复发表的日期和时间,UTC 时区,采用 Unix/Epoch 格式。<br><br>示例: `1627617835`.|
#|text|string|回复的文本内容。<br><br>示例: `"This is a comment #comment 🙂"`.|

示例

(code Success-Response http)
HTTPS/1.1 200 OK

{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "video_id": "{{video_id}}",
        "parent_comment_id": "{{parent_comment_id}}",
        "comment_id": "{{comment_id}}",
        "create_time": "1701334608",
        "text": "{{text}}",
        "user_id": "{{user_id}}"
    }
}
(/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 每日平台更新简报 →