Skip to main content

Callback After User Registration Request

Functional Description

The App business server can get the user's registration request through this callback, and the App backend can perform operations such as data synchronization based on this.

Precautions

  • To enable the callback, you must configure the callback URL and turn on the switch corresponding to this callback protocol. See the Callback Description document for configuration methods.
  • The callback direction is an HTTP/HTTPS POST request initiated by OpenIM Server to the App backend.
  • The APP business server must respond to this request within the timeout period.

Scenarios That May Trigger This Callback

  • After a new user registers an account through the client.

Timing of Callback

  • After OpenIM Server successfully processes a new user account registration.

Interface Description

Request URL Example

Here CallbackCommand is: callbackAfterUserRegisterCommand

{WEBHOOK_ADDRESS}/callbackAfterUserRegisterCommand?contenttype=json

Request Package Example

{
"callbackCommand": "callbackAfterUserRegisterCommand",
"users": {
"userID": "user123",
"nickname": "John Doe",
"faceURL": "http://example.com/path/to/face/image.png",
"ex": "Extra data",
"createTime": 1673048592000,
"appMangerLevel": 1,
"globalRecvMsgOpt": 1
}
}

Request Package Field Description

FieldTypeDescription
callbackCommandstringCallback command, here it is the callback after user registration
usersobjectUser information object
userIDstringUnique identifier of the user
nicknamestringNickname of the user
faceURLstringURL of the user's avatar
exstringExtra data field
createTimeint64User creation timestamp (milliseconds)
appMangerLevelint32Manager level of the user
globalRecvMsgOptint32Global receive message option of the user

Response Package Example

Operation Successful

App backend successfully synchronizes data.

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

Response Package Field Description

FieldValueDescription
actionCode0Indicates whether the business system callback was executed correctly. 0 means the operation was successful.
errCode20001Custom error code, ranges from 20001-29999. Set when actionCode is not 0; set when nextCode is 1.
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,