Skip to main content

Callback After Dissolving a Group

Function Description

The App business server can receive information about the dissolution of a group through this callback, including real-time recording of the group's dissolution (such as logging or synchronizing with other systems).

Precautions

  • To enable the callback, you must configure the callback URL and activate the switch corresponding to this callback protocol. See the Callback Description document for configuration methods.
  • The direction of the callback is an HTTP/HTTPS POST request initiated by OpenIM Server to the App backend.
  • The App business server needs to verify whether the command parameter in the request URL is its own SDKNAME parameter after receiving the callback request.
  • The APP business server is required to respond to this request within the timeout period.

Scenarios That May Trigger This Callback

  • App users dissolve a group through the client.
  • App administrators dissolve a group through the REST API.

Timing of the Callback

  • After the group is dissolved.

Interface Description

Request URL Example

In the following example, the configured callback URL of the App is https://callbackurl.

https://callbackurl?command=$CallbackCommand&contenttype=json

Request Parameter Description

ParameterDescription
httpsRequest protocol is HTTPS, request method is POST
https://callbackurlCallback URL
CallbackCommandFixed value: callbackAfterUngroupCommand
contenttypeFixed value: JSON
Header NameExample ValueOptionalTypeDescription
operationID1646445464564RequiredstringoperationID used for global tracing

Request Packet Example

{
"callbackCommand": "callbackAfterUngroupCommand",
"groupID": "G001",
"groupType": 1,
"ownerID": "user123",
"memberList": ["user456", "user789"]
}

Request Packet Field Description

ObjectTypeDescription
callbackCommandstringCallback command, here for post-group dissolution
groupIDstringUnique identifier of the group
groupTypeint32Type of the group
ownerIDstringID of the group owner
memberListarrayList of group members, including user IDs, representing members in the group at the time of dissolution
muteEndTimeint64Timestamp for the end of muting members in the group (milliseconds), empty if not muted

Response Packet Example

Processing Result

After the App backend records the group dissolution information, it sends a callback response packet.

{
"actionCode": 0,
"errCode": 0,
"errMsg": "Success",
"errDlt": "",
"nextCode": 1
}

Response Packet Field Description

FieldValueDescription
actionCode0Indicates whether the business system's callback was executed correctly. 0 means the operation was successful.
errCode0Represents a custom error code, here 0 indicates ignoring the callback result.
errMsg"An error message"Simple error message corresponding to the custom error code.
errDlt"Detailed error information"Detailed error information corresponding to the custom error code.
nextCode1Next execution instruction, 1 means refuse to continue execution, set when actionCode is 0.