创建评论
POST
https://open.feishu.cn/open-apis/task/v1/tasks/{task_id}/comments
自建应用商店应用
错误码
HTTP状态码 | 错误码 | 描述 | 排查建议 |
---|---|---|---|
403 | 1470403 | The identity token is incorrect. It should be either user_access_token or tenant_access_token. | 发起请求方的身份token不正确,需要为UserAccessToken或TenantAccessToken其中一种 |
500 | 1470730 | failed to create comment | 一般是创建评论时系统内部逻辑处理出现问题,可根据具体错误进行分析,无法解决时请找相关服务的同学处理 |
400 | 1470417 | failed to parse rich_content | 解析富文本失败,请检查富文本是否格式正确 |
400 | 1470418 | comment is empty | 评论的内容为空,需要填充评论内容 |
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://open.feishu.cn/open-apis/task/v1/tasks/83912691-2e43-47fc-94a4-d512e03984fa/comments' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"content":"多喝水,少吃肉",
"rich_content":"富文本评论[飞书开放平台](https://open.feishu.cn)",
"parent_id":0
}'
响应示例响应示例
{
"code": 0,
"data": {
"comment": {
"content": "多喝水,少吃肉",
"rich_content": "富文本评论飞书开放平台\n",
"id": "6997680617668214803",
"parent_id": "0"
}
},
"msg": "success"
}
请求参数
Path 参数
task_id
string
必需
示例值:
83912691-2e43-47fc-94a4-d512e03984fa
Header 参数
Authorization
string
必需
默认值:
Bearer {{access_token}}
Content-Type
string
必需
默认值:
application/json; charset=utf-8
Body 参数application/json
返回响应
修改于 2023-02-02 08:05:19