Skip to main content

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

FieldTypeDescription
callbackCommandstringCallback command; here, for post-group information setting
operationIDstringFor global traceability; suggested to use a timestamp, unique per request
groupIDstringUnique identifier of the group
groupNamestringName of the group
notificationstringGroup notification information
introductionstringGroup introduction
faceURLstringURL of the group's icon
ex*stringAdditional data field
needVerification*int32Whether verification is required to join
lookMemberInfo*int32Whether group members’ info is visible
applyMemberFriend*int32Whether 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

FieldValueDescription
actionCode0Indicates whether the callback was successful. 0 means success.
errCode0Custom 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.
nextCode1Next step directive; set to 1 to stop further action if actionCode = 0.