服务端 API
按字段设置群资料后
在按字段设置群资料后同步变更。
触发时机
| 项目 | 说明 |
|---|---|
| 类型 | 后置回调 |
| 配置项 | afterSetGroupInfoEx |
| 回调命令 | callbackAfterSetGroupInfoExCommand |
HTTP 请求
POST {WEBHOOK_ADDRESS}/callbackAfterSetGroupInfoExCommand
Content-Type: application/json
operationID: {OPERATION_ID}{
"callbackCommand": "callbackAfterSetGroupInfoExCommand",
"operationID": "operation_001",
"groupID": "group_001",
"groupName": "group_001",
"notification": "",
"introduction": "",
"faceURL": "https://example.com/avatar.png",
"ex": "",
"needVerification": 1,
"lookMemberInfo": 1,
"applyMemberFriend": 1
}请求体参数
| 参数名 | 是否必填 | 类型 | 说明 |
|---|---|---|---|
| callbackCommand | 是 | object | 回调命令,值与当前页面的回调命令一致。 |
| operationID | 是 | string | OpenIM 操作的链路追踪 ID。 |
| groupID | 是 | string | 群组 ID。 |
| groupName | 否 | string | 群组名称。 |
| notification | 否 | string | 群公告。 |
| introduction | 否 | string | 群简介。 |
| faceURL | 否 | string | 头像地址。 |
| ex | 否 | string | 业务扩展字段。 |
| needVerification | 否 | int | 入群验证方式。 |
| lookMemberInfo | 否 | int | 是否允许普通成员查看群成员资料。 |
| applyMemberFriend | 否 | int | 是否允许普通成员添加群成员为好友。 |
响应
业务服务端应返回 HTTP 成功状态和 JSON 响应体。
{
"actionCode": 0,
"errCode": 0,
"errMsg": "",
"errDlt": "",
"nextCode": 0
}响应参数
| 参数名 | 类型 | 说明 |
|---|---|---|
| actionCode | int | 处理状态,参见Webhooks 概述的 CallbackAction。 |
| errCode | int | 业务错误码;拒绝前置操作时返回业务约定的非零错误码。 |
| errMsg | string | 错误简要信息。 |
| errDlt | string | 错误详细信息。 |
| nextCode | int | 处理下一步,参见Webhooks 概述的 CallbackNextCode。 |
处理规则
- 事件发生后,OpenIM 异步调用该地址。
- 回调响应不能改变已经完成的 OpenIM 操作。
- 接收方应快速返回成功状态,再异步执行耗时业务。
- 接收方应按业务主键或
operationID做幂等处理。
相关页面
这个页面有帮助吗?