Callback After Transferring Group Ownership
Description
The App backend can use this callback to receive information about group ownership transfers and, if needed, to carry out follow-up processing or logging of the transferred group.
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 backend must respond to this request within the specified timeout.
Scenarios that Trigger This Callback
- A user or administrator transfers group ownership via the client or API interface.
Timing of Callback
- After OpenIMServer successfully transfers group ownership.
Interface Description
Example Request URL
The CallbackCommand
here is: callbackAfterTransferGroupOwnerCommand
{WEBHOOK_ADDRESS}/callbackAfterTransferGroupOwnerCommand?contenttype=json
Example Request Package
{
"callbackCommand": "callbackAfterTransferGroupOwnerCommand",
"groupID": "G12345",
"oldOwnerUserID": "userOld123",
"newOwnerUserID": "userNew456"
}
Request Package Field Descriptions
Field | Type | Description |
---|---|---|
callbackCommand | string | Callback command; here, it's the callback after transferring group ownership |
groupID | string | Unique identifier of the group |
oldOwnerUserID | string | User ID of the previous group owner |
newOwnerUserID | string | User ID of the new group owner |
Example Response Package
Success Response
Indicates that the business system successfully processed the group ownership transfer callback.
{
"actionCode": 0,
"errCode": 0,
"errMsg": "",
"errDlt": "",
"nextCode": 0
}
Failure Response
Indicates that the business system could not process the callback, with error details.
{
"actionCode": 1,
"errCode": 5002,
"errMsg": "Unable to process the request",
"errDlt": "The group ownership transfer cannot be processed due to internal policy",
"nextCode": 1
}
Response Package Field Descriptions
Field | Type | Description |
---|---|---|
actionCode | int | Indicates if the callback was successfully executed. 0 for success. |
errCode | int | Custom error code; use 0 to ignore the callback result |
errMsg | string | Simple error message for the custom error code |
errDlt | string | Detailed error information for the custom error code |
nextCode | int | Next step directive; set to 1 to stop further action if actionCode = 0 |