Callback After Setting Group Information
Description
The App backend can use this callback to monitor changes in group information in real-time. This includes notifying the App backend of group information updates, allowing for logging or synchronization with other systems.
Important Notes
- To enable this callback, configure the callback URL and activate the corresponding protocol switch. For configuration details, see the Callback Introduction document.
- The callback direction is from OpenIMServer to the App backend as an HTTP/HTTPS POST request.
- The App business server must respond within the specified timeout period.
Scenarios that Trigger This Callback
- A user requests to modify group information through the App client.
- An App administrator changes group information via the REST API.
Timing of Callback
- After OpenIMServer has completed the modification of the group information.
Interface Description
Example Request URL
The CallbackCommand
here is: callbackAfterSetGroupInfoExCommand
{WEBHOOK_ADDRESS}/callbackAfterSetGroupInfoExCommand?contenttype=json
Example Request Package
{
"callbackCommand": "callbackAfterSetGroupInfoExCommand",
"operationID": "1646445464564",
"groupID": "G002",
"groupName": {
"value": "NewGroupName"
},
"notification": {
"value": "Updated group notification"
},
"introduction": {
"value": "Updated group introduction"
},
"faceURL": {
"value": "http://example.com/new/path/to/face/image.png"
},
"ex": {
"value": "Updated extra data"
},
"needVerification": {
"value": 0
},
"lookMemberInfo": {
"value": 1
},
"applyMemberFriend": {
"value": 0
}
}
Request Package Field Descriptions
Field | Type | Description |
---|---|---|
callbackCommand | string | Callback command; here, for post-group information setting |
operationID | string | For global traceability; suggested to use a timestamp, unique per request |
groupID | string | Unique identifier of the group |
groupName | string | Name of the group |
notification | string | Group notification information |
introduction | string | Group introduction |
faceURL | string | URL of the group's icon |
ex | *string | Additional data field |
needVerification | *int32 | Whether verification is required to join |
lookMemberInfo | *int32 | Whether group members’ info is visible |
applyMemberFriend | *int32 | Whether members can request to add friends |
Example Response Package
Operation Complete
Confirms that the modification of the group information is complete.
{
"actionCode": 0,
"errCode": 0,
"errMsg": "",
"errDlt": "",
"nextCode": 0
}
Response Package Field Descriptions
Field | Value | Description |
---|---|---|
actionCode | 0 | Indicates whether the callback was successful. 0 means success. |
errCode | 0 | Custom error code; fill as 0 to ignore the callback result. |
errMsg | "An error message" | Simple error message for the custom error code. |
errDlt | "Detailed error information" | Detailed error information for the custom error code. |
nextCode | 1 | Next step directive; set to 1 to stop further action if actionCode = 0 . |