Skip to main content

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

FieldTypeDescription
callbackCommandstringCallback command; here, it's the callback after transferring group ownership
groupIDstringUnique identifier of the group
oldOwnerUserIDstringUser ID of the previous group owner
newOwnerUserIDstringUser 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

FieldTypeDescription
actionCodeintIndicates if the callback was successfully executed. 0 for success.
errCodeintCustom error code; use 0 to ignore the callback result
errMsgstringSimple error message for the custom error code
errDltstringDetailed error information for the custom error code
nextCodeintNext step directive; set to 1 to stop further action if actionCode = 0