Skip to main content

Callback After Setting Group Member Information

Description

The App backend can use this callback to retrieve requests for setting group member information, allowing the App to perform necessary data synchronization.

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 group administrator successfully modifies group member-related information through the client.

Timing of Callback

  • After OpenIMServer updates group member information.

Interface Description

Example Request URL

The CallbackCommand here is: callbackAfterSetGroupMemberInfoCommand

{WEBHOOK_ADDRESS}/callbackAfterSetGroupMemberInfoCommand?contenttype=json

Example Request Package

{
"callbackCommand": "callbackAfterSetGroupMemberInfoCommand",
"groupID": "12345",
"userID": "user789",
"nickName": "user",
"faceURL": "http://example.com/path/to/face/image.png",
"roleLevel": 20,
"ex": "Extra data"
}

Request Package Field Descriptions

FieldTypeDescription
callbackCommandstringCallback command; here it’s the callback after setting group member info
groupIDstringUnique identifier of the group
userIDstringUser ID joining the group
nickName*stringNickname of the user joining the group
faceURL*stringURL of the member’s icon
roleLevel*int32User’s permission level in the group. Regular member (20) or admin (60)
ex*stringAdditional data field

Example Response Package

After synchronizing data, the App backend sends a callback response package.

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

Response Package Field Descriptions

FieldValueDescription
actionCode0Indicates whether the callback was successful. 0 means success.
errCode0Custom error code; use 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