Skip to main content

user_register

Brief Description

  • After users complete account registration through the AppServer, the AppServer then calls this interface to import into OpenIM, achieving account integration.

Request Method

  • post

Request URL

  • http://x.x.x.x:10002/user/user_register
Header NameExample ValueOptionalTypeDescription
operationID1646445464564RequiredstringoperationID for global link tracking

Request Parameter Example

{
"secret": "openIM123",
"users": [
{
"userID": "11111112",
"nickname": "yourNickname",
"faceURL": "yourFaceURL"
}
]
}
Field NameOptionalTypeDescription
secretRequiredstringopenIM secret key, see the secret field in config/config.yaml
usersRequiredarrayList of users
users.userIDRequiredstringUser ID
users.nicknameRequiredstringUser nickname
users.faceURLRequiredstringUser profile picture link

Successful Response Example

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

Explanation for Successful Response Parameters

Parameter NameTypeDescription
errCodeintError code, 0 means success
errMsgstringBrief error message, empty if no error
errDlterrDltDetailed error information, empty if no error
dataobjectGeneral data object, specific structure below

Failed Response Example

{
"errCode": 1001,
"errMsg": "ArgsError",
"errDlt": ""
}

Explanation for Failed Response Parameters

Parameter NameTypeDescription
errCodeintError code, refer to the global error code document
errMsgstringBrief error message
errDlterrDltDetailed error information