添加会话标签页
POST
https://open.feishu.cn/open-apis/im/v1/chats/{chat_id}/chat_tabs
doc
和url
的会话标签页url
类型的会话标签页生效错误码
HTTP状态码 | 错误码 | 描述 | 排查建议 |
---|---|---|---|
400 | 232001 | Your request contains an invalid request parameter. | 参数错误,参考本文档检查输入参数。 |
400 | 232006 | Your request specifies a chat_id which is invalid. | 无效的 chat_id,请检查chat_id是否正确。 |
400 | 232010 | Operator and chat can NOT be in different tenants. | 操作者和被操作的群组应该在同一租户下。 |
400 | 232011 | Operator can NOT be out of the chat. | 操作者需要在群组中。 |
400 | 232025 | Bot ability is not activated. | 应用需要开启机器人能力。 |
400 | 232033 | The operator or invited bots does NOT have the authority to manage external chats without the scope. | 没有权限操作外部群。 |
400 | 232034 | The app is unavailable or inactivated by the tenant. | 应用在本租户下未安装或未启用。 |
400 | 232046 | The number of chat tabs has reached the limit. | 自定义的会话标签页个数超过上限20个。 |
400 | 232047 | The length of the tab name reaches the limit. | 会话标签页名称过长。 |
400 | 232048 | The chat tab content is illegal. | 会话标签页内容非法。 |
400 | 232050 | Operate chat tab unsupported chat type. | 请求的群类型不支持会话标签页。 |
400 | 232051 | The operator does not have doc permission. | 操作者必须拥有文档权限。 |
400 | 232055 | The operator does not have chat tab manage permission. | 没有会话标签页的管理权限,请检查群设置中“谁可以管理标签页”是否开启了“仅群主和管理员”。 |
400 | 232056 | The operator is not the image's owner, no permission to complete the request. | 机器人需要使用自己上传的图片。 |
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://open.feishu.cn/open-apis/im/v1/chats//chat_tabs' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"chat_tabs": [
{
"tab_name": "文档",
"tab_type": "doc",
"tab_content": {
"doc": "https://bytedance.feishu.cn/wiki/wikcnPIcqWjJQwkwDzrB9t40123xz"
}
},
{
"tab_name": "测试",
"tab_type": "url",
"tab_content": {
"url": "https://www.test.cn"
},
"tab_config": {
"icon_key": "img_v2_b99741-7628-4abd-aad0-b881e4db83ig",
"is_built_in": true
}
}
]
}'
响应示例响应示例
{
"code": 0,
"msg": "ok",
"data": {
"chat_tabs": [
{
"tab_id": "7101214603622940633",
"tab_type": "message"
},
{
"tab_id": "7101214603622940671",
"tab_name": "文档",
"tab_type": "doc",
"tab_content": {
"doc": "https://bytedance.feishu.cn/wiki/wikcnPIcqWjJQwkwDzrB9t40123xz"
}
},
{
"tab_id": "7158333373373759422",
"tab_name": "测试",
"tab_type": "url",
"tab_content": {
"url": "https://www.test.cn"
},
"tab_config": {
"icon_key": "img_v2_b99741-7628-4abd-aad0-b881e4db83ig",
"is_built_in": true
}
}
]
}
}
请求参数
Path 参数
chat_id
string
必需
Header 参数
Authorization
string
必需
默认值:
Bearer {{access_token}}
Content-Type
string
必需
默认值:
application/json; charset=utf-8
Body 参数application/json
返回响应
修改于 2023-01-13 02:33:42