Skip to content

删除建群白名单

1. 接口定位

  • 接口名称: 删除建群白名单
  • 所属域: admin/group
  • 业务目标: 将指定用户从建群白名单中移除

2. 请求定义

  • Method: POST
  • Path: /adminx/group/create_permission/del
  • Content-Type: 推荐 application/json
  • operationID: 必填,请通过 Header operationID 传入
  • 鉴权: 需要 Header token,且必须是管理员 token
  • 幂等性: 非幂等

3. 请求参数

Header 参数

字段必填类型说明
operationIDstring链路追踪 ID
tokenstring管理员 token

Body 参数

字段必填类型说明
userIDsarray<string>待移除的用户 ID 列表

4. 响应结构

通用响应包裹

字段类型说明
errCodeint错误码,0 表示成功
errMsgstring错误简述
errDltstring错误详情
dataobject业务数据

data 字段

  • 成功时返回空对象。

5. 业务规则

  • 请求中的所有 userID 都必须已存在于白名单中。
  • 若部分用户不在白名单中,返回 user id not in group create whitelist
  • 删除前会先批量查询现有白名单记录做一致性校验。

6. 错误码与失败场景

错误码场景典型报错
1001Header 缺少 operationIDheader must have operationID
1004某些用户不在建群白名单中user id not in group create whitelist
-缺少管理员 token由管理员鉴权链路返回
-白名单查询或删除失败由存储链路返回

7. 示例

fetch 请求示例

javascript
fetch("http://localhost:10011/adminx/group/create_permission/del", {
  method: "POST",
  headers: {
    operationID: "group-create-permission-del-001",
    token: "eyJhbGciOi...",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    userIDs: ["user_001", "user_002"],
  }),
})
  .then((res) => res.json())
  .then((data) => console.log(data));

请求示例(JSON)

json
{
  "userIDs": ["user_001", "user_002"]
}

成功响应示例

json
{
  "errCode": 0,
  "errMsg": "",
  "errDlt": "",
  "data": {}
}

8. 时序流程

  1. 中间件校验管理员 token。
  2. 查询待删除用户的建群白名单记录。
  3. 若存在缺失用户,直接返回失败。
  4. 批量删除对应白名单记录。

9. 变更记录

  • 2026-04-06: 补全文档结构,修正真实服务前缀为 /adminx