服务端 API/群组/会话标签页/删除会话标签页
# 删除会话标签页

删除会话标签页。

**注意事项**：注意事项：
- 应用需要开启[机器人能力](https://open.larksuite.com/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)
- 机器人或授权用户必须在群里
- 只允许删除类型为`doc`和`url`的会话标签页
- 在开启 ==仅群主和管理员可管理标签页== 的设置时，仅群主和群管理员可以删除会话标签页
- 操作内部群时，操作者须与群组在同一租户下

## 请求

基本 | &nbsp;
---|---
HTTP URL | https://open.larksuite.com/open-apis/im/v1/chats/:chat_id/chat_tabs/delete_tabs
HTTP Method | DELETE
接口频率限制 | [1000 次/分钟、50 次/秒](https://open.larksuite.com/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
支持的应用类型 | Custom App、Store App
权限要求<br>**调用该 API 所需的权限。开启其中任意一项权限即可调用**<br>开启任一权限即可 | 获取与更新群组信息(im:chat)<br>操作群会话标签页(im:chat.tabs:write_only)

### 请求头

名称 | 类型 | 必填 | 描述
---|---|---|---
Authorization | string | 是 | `tenant_access_token`<br>或<br>`user_access_token`<br>**值格式**："Bearer `access_token`"<br>**示例值**："Bearer u-7f1bcd13fc57d46bac21793a18e560"<br>[了解更多：如何选择与获取 access token](https://open.larksuite.com/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)
Content-Type | string | 是 | **固定值**："application/json; charset=utf-8"

### 路径参数

名称 | 类型 | 描述
---|---|---
chat_id | string | 群ID，详情参见[群ID 说明](https://open.larksuite.com/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-id-description)<br>**注意**：支持群模式为`p2p`与`group`的群ID<br>**示例值**："oc_a0553eda9014c201e6969b478895c230"

### 请求体

名称 | 类型 | 必填 | 描述
---|---|---|---
tab_ids | string\[\] | 是 | 会话标签页ID列表，Tab ID可以在[添加会话标签页](https://open.larksuite.com/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/create)与[拉取会话标签页](https://open.larksuite.com/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/list_tabs)的返回值中获取<br>**示例值**：["6936075528890826780"]

### 请求体示例
```json
{
    "tab_ids": [
        "6936075528890826780"
    ]
}
```

## 响应

### 响应体

名称 | 类型 | 描述
---|---|---
code | int | 错误码，非 0 表示失败
msg | string | 错误描述
data | \- | \-
chat_tabs | chat.tab\[\] | 会话标签页
tab_id | string | Tab ID
tab_name | string | Tab名称<br>**注意**：会话标签页的名称不能超过30个字符
tab_type | string | Tab类型<br>**可选值有**：<br>- message：消息类型<br>- doc_list：云文档列表<br>- doc：文档<br>- pin：Pin<br>- meeting_minute：会议纪要<br>- chat_announcement：群公告<br>- url：URL<br>- file：文件
tab_content | chat_tab_content | Tab内容
url | string | URL类型
doc | string | Doc链接
meeting_minute | string | 会议纪要
tab_config | chat_tab_config | Tab的配置
icon_key | string | 群Tab图标
is_built_in | boolean | 群tab是否App内嵌打开

### 响应体示例
```json
{
	"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://example.larksuite.com/wiki/wikcnPIcqWjJQwkwDzrB9t40123xz"
				}
			}
		]
	}
}
```

### 错误码

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 | 232009 | Your request specifies a chat which has already been dissolved. | 群组已被解散。
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. | 应用需要开启[机器人能力](https://open.larksuite.com/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。
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 | 232049 | Operate chat tab unsupported chat type. | 更新或者删除操作仅支持doc或者url类型的会话标签页。
400 | 232050 | The operator does not have chat tab, chat menu, chat widget manage permission | 请求的群类型不支持会话标签页。
400 | 232055 | The operator does not have chat tab, chat menu, chat widget manage permission | 没有会话标签页、会话菜单和小组件的管理权限，请检查群设置中“谁可以给管理会话标签页、会话菜单和小组件”是否开启了“仅群主和管理员”。

