浏览 平台 API
服务端 API

按字段设置群资料前

复制

在按字段设置群资料前校验或调整本次变更。

触发时机

项目说明
类型前置回调
配置项beforeSetGroupInfoEx
回调命令callbackBeforeSetGroupInfoExCommand

HTTP 请求

POST {WEBHOOK_ADDRESS}/callbackBeforeSetGroupInfoExCommand
Content-Type: application/json
operationID: {OPERATION_ID}
{
  "callbackCommand": "callbackBeforeSetGroupInfoExCommand",
  "operationID": "operation_001",
  "groupID": "group_001",
  "groupName": "group_001",
  "notification": "",
  "introduction": "",
  "faceURL": "https://example.com/avatar.png",
  "ex": "",
  "needVerification": 1,
  "lookMemberInfo": 1,
  "applyMemberFriend": 1
}

请求体参数

参数名是否必填类型说明
callbackCommandobject回调命令,值与当前页面的回调命令一致。
operationIDstringOpenIM 操作的链路追踪 ID。
groupIDstring群组 ID。
groupNamestring群组名称。
notificationstring群公告。
introductionstring群简介。
faceURLstring头像地址。
exstring业务扩展字段。
needVerificationint入群验证方式。
lookMemberInfoint是否允许普通成员查看群成员资料。
applyMemberFriendint是否允许普通成员添加群成员为好友。

响应

业务服务端应返回 HTTP 成功状态和 JSON 响应体。

{
  "actionCode": 0,
  "errCode": 0,
  "errMsg": "",
  "errDlt": "",
  "nextCode": 0,
  "groupID": "group_001",
  "groupName": "group_001",
  "notification": "",
  "introduction": "",
  "faceURL": "https://example.com/avatar.png",
  "ex": "",
  "needVerification": 1,
  "lookMemberInfo": 1,
  "applyMemberFriend": 1
}

响应参数

参数名类型说明
actionCodeint处理状态,参见Webhooks 概述的 CallbackAction
errCodeint业务错误码;拒绝前置操作时返回业务约定的非零错误码。
errMsgstring错误简要信息。
errDltstring错误详细信息。
nextCodeint处理下一步,参见Webhooks 概述的 CallbackNextCode
groupIDstring群组 ID。
groupNamestring群组名称。
notificationstring群公告。
introductionstring群简介。
faceURLstring头像地址。
exstring业务扩展字段。
needVerificationint入群验证方式。
lookMemberInfoint是否允许普通成员查看群成员资料。
applyMemberFriendint是否允许普通成员添加群成员为好友。

处理规则

  • OpenIM 同步等待业务服务端响应。
  • 返回 nextCode: 0 时继续原流程;返回 nextCode: 1 时,OpenIM 使用响应中的错误信息终止本次操作。
  • 请求失败或超时后的行为由该回调的 failedContinue 配置决定。
  • 响应中的业务字段仅在对应字段存在时覆盖 OpenIM 即将处理的数据。

相关页面