更新群信息
PUT
/open-apis/im/v1/chats/{chat_id}
自建应用商店应用
错误码
HTTP状态码 | 错误码 | 描述 | 排查建议 |
---|---|---|---|
400 | 232001 | Your request contains an invalid request parameter. | 参数错误,参考本文档检查输入参数。 |
400 | 232002 | No Permission: Only chat owner or admin can edit chat information in the current situation. | 只允许群主或群管理可以编辑群信息。 |
400 | 232004 | Such an app does NOT exist. | 作为操作者的 app_id 不存在,请联系技术支持。 |
400 | 232006 | Your request specifies a chat_id which is invalid. | 无效的 chat_id,请检查chat_id是否正确。 |
400 | 232008 | Your request specifies a chat whose type is NOT supported currently. | 不支持的群模式(chat_mode)或群类型(chat_type)。 |
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 | 232012 | New chat owner can NOT be out of the chat. | 新任群主不在群组中。 |
400 | 232016 | Non-chat-owner or Non-chat-admin can only edit certain parts. | 非群主和管理员的普通群成员只能修改部分群信息 (avatar, name, description, i18n_names)。 |
400 | 232019 | The request has been rate limited. | 触发群限流,请控制请求的速度,详情参见频控策略。 |
400 | 232025 | Bot ability is not activated. | 应用需要开启机器人能力。 |
400 | 232026 | This name is already used in an existing public chat. Names of public chats are supposed to be different. | 公开群群名已存在。 |
400 | 232030 | Your request specifies a user_id which is invalid. | 请检查user_id是否正确。 |
400 | 232031 | The chat and the new designated chat owner must be in the same tenant. | 不允许跨租户转让群主。 |
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 | 232035 | Your request specifies an owner_id which is invalid. | 检查owner_id是否正确。 |
400 | 232037 | The operator or invited bots does NOT have the authority to manage chat labels without the scope. | 操作者或受邀的机器人没有权限管理群Label,请检查权限配置。 |
400 | 232041 | The avatar key is illegal. | 群头像 key 非法,请检查后重新输入。 |
400 | 232047 | The length of the tab name reaches the limit. | 会话标签页名称过长。 |
400 | 232057 | The operator tenant doesn't have the permission to use restricted mode. | 操作者所属的租户没有权限使用防泄密模式,请联系租户管理员。 |
400 | 232069 | current chat type unsupported to set public. | 不支持群类型为public的外部群。 |
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://open.feishu.cn/open-apis/im/v1/chats/oc_a0553eda9014c201e6969b478895c230' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"avatar": "default-avatar_44ae0ca3-e140-494b-956f-78091e348435",
"name": "群聊",
"description": "测试群描述",
"i18n_names": {
"zh_cn": "群聊",
"en_us": "group chat",
"ja_jp": "グループチャット"
},
"add_member_permission": "all_members",
"share_card_permission": "allowed",
"at_all_permission": "all_members",
"edit_permission": "all_members",
"owner_id": "4d7a3c6g",
"join_message_visibility": "only_owner",
"leave_message_visibility": "only_owner",
"membership_approval": "no_approval_required"
}'
响应示例响应示例
{
"code": 0,
"data": {},
"msg": "ok"
}
请求参数
Path 参数
chat_id
string
必需
示例值:
oc_a0553eda9014c201e6969b478895c230
Query 参数
user_id_type
string
可选
示例值:
open_id
Header 参数
Authorization
string
必需
默认值:
Bearer {{access_token}}
Content-Type
string
必需
默认值:
application/json; charset=utf-8
Body 参数application/json
返回响应
修改于 2023-01-12 10:14:41