Callback for User Exiting Group
Description
The App business server can use this callback to view requests when a user exits a group, enabling the App backend to perform data synchronization or other necessary actions.
Important Notes
- To enable this callback, configure the callback URL and activate the corresponding protocol switch. Refer to the Callback Introduction document for configuration details.
- The callback direction is from OpenIM Server 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 exits a group via the App client.
Timing of Callback
- After the user successfully exits the group in OpenIM Server.
Interface Description
Example Request URL
The CallbackCommand
here is: callbackAfterQuitGroupCommand
{WEBHOOK_ADDRESS}/callbackAfterQuitGroupCommand?contenttype=json
Example Request Package
{
"callbackCommand": "callbackAfterQuitGroupCommand",
"groupID": "G001",
"userID": "user123"
}
Request Package Field Descriptions
Field | Type | Description |
---|---|---|
callbackCommand | string | Callback command for user exiting the group. |
groupID | string | Unique identifier of the group the user is exiting. |
userID | string | ID of the user attempting to exit the group. |
Example Response Package
{
"actionCode": 0,
"errCode": 0,
"errMsg": "",
"errDlt": "",
"nextCode": 0
}
Response Package Field Descriptions
Field | Value | Description |
---|---|---|
actionCode | 0 | Indicates whether the callback executed successfully. 0 means success. |
errCode | 0 | Custom error code; 0 here indicates the callback result is ignored. |
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. |
nextCode | 1 | Next execution directive. Set to 1 to stop further action when actionCode = 0 . |