Skip to main content

get_users_online_status

Brief Description

  • Retrieve the online status and token of a specified user across various devices.

Request Method

  • post

Request URL

  • http://x.x.x.x:10002/user/get_users_online_status
Header NameSample ValueOptionalTypeDescription
operationID1646445464564MandatorystringoperationID for global link tracing
tokeneyJhbxxxx3XsMandatorystringAdmin token

Request Parameter Example

{
"userIDs": [
"2890713225"
]
}
Field NameOptionalTypeDescription
userIDsMandatoryarrayList of user IDs to query

Successful Response Example

{
"errCode": 0,
"errMsg": "",
"errDlt": "",
"data": [
{
"userID": "2890713225",
"status": "online",
"detailPlatformStatus": [
{
"platform": "Windows",
"status": "online",
"connID": "bbb7c4da159b1ec6beb81c9e4129b075",
"isBackground": false,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySUQiOiIyODkwNzEzMjI1IiwiUGxhdGZvcm1JRCI6MywiZXhwIjoxNzA0Njk1NzI0LCJuYmYiOjE2OTY5MTk0MjQsImlhdCI6MTY5NjkxOTcyNH0.-TBNT0YKn_8YH9oO8A8SYEpNzOg1-EQD8O23R0MsVLE"
},
{
"platform": "Android",
"status": "online",
"connID": "f18b67b5f57f01604b9f7c338238f43d",
"isBackground": false,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySUQiOiIyODkwNzEzMjI1IiwiUGxhdGZvcm1JRCI6MiwiZXhwIjoxNzA0NTA5ODg4LCJuYmYiOjE2OTY3MzM1ODgsImlhdCI6MTY5NjczMzg4OH0.uii4Sf05z7VIGCDXUEtqq7cwdXakWkJJrCwYUigvc3I"
}
]
}
]
}

Successful Response Parameters Explanation

Parameter NameTypeDescription
errCodeintError code, 0 indicates success
errMsgstringBrief error message, empty if no error
errDlterrDltDetailed error message, empty if no error
dataarrayGeneric data array, see structure below
userIDstringUser ID
statusstringOnline status, online: "online", offline: "offline"
detailPlatformStatusarrayDetailed online status for each platform
detailPlatformStatus.platformstringPlatform ID, e.g., 1: IOS, 2: Android, 3: Windows, etc.
detailPlatformStatus.statusstringOnline status, online: "online", offline: "offline"
detailPlatformStatus.connIDstringConnection ID
detailPlatformStatus.isBackgroundbooleanWhether the app is in the background
detailPlatformStatus.tokenstringToken information

Failed Response Example

{
"errCode": 1004,
"errMsg": "RecordNotFoundError",
"errDlt": ": [1004]RecordNotFoundError"
}

Failed Response Parameters Explanation

Parameter NameTypeDescription
errCodeintError code, refer to global error code document for details
errMsgstringBrief error message
errDlterrDltDetailed error message