Skip to main content

Get Specified User Online Status

Brief Description

  • Get the online status and token of the specified user's terminals.

Request Method

  • post

Request URL

  • {API_ADDRESS}/user/get_users_online_status
Header NameExample ValueOptionalTypeDescription
operationID1646445464564RequiredstringUsed for global link tracking, timestamp is recommended, independent in each request
tokeneyJhbxxxx3XsRequiredstringAdmin token

Request Parameter Example

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

Success Return Example

{
"errCode": 0,
"errMsg": "",
"errDlt": "",
"data": [
{
"userID": "2890713225",
"status": 1,
"detailPlatformStatus": [
{
"platformID": 2,
"connID": "bbb7c4da159b1ec6beb81c9e4129b075",
"isBackground": false,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySUQiOiIyODkwNzEzMjI1IiwiUGxhdGZvcm1JRCI6MywiZXhwIjoxNzA0Njk1NzI0LCJuYmYiOjE2OTY5MTk0MjQsImlhdCI6MTY5NjkxOTcyNH0.-TBNT0YKn_8YH9oO8A8SYEpNzOg1-EQD8O23R0MsVLE"
},
{
"platformID": 3,
"connID": "f18b67b5f57f01604b9f7c338238f43d",
"isBackground": false,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySUQiOiIyODkwNzEzMjI1IiwiUGxhdGZvcm1JRCI6MiwiZXhwIjoxNzA0NTA5ODg4LCJuYmYiOjE2OTY3MzM1ODgsImlhdCI6MTY5NjczMzg4OH0.uii4Sf05z7VIGCDXUEtqq7cwdXakWkJJrCwYUigvc3I"
}
]
}
]
}

Parameter Description for Success Return Example

Parameter NameTypeDescription
errCodeintError code, 0 means successful
errMsgstringBrief error message, empty
errDlterrDltDetailed error message, empty
dataobjectGeneric data object, specific structure is below
userIDstringUser ID
statusintOnline status, online: 1, offline: 0
detailPlatformStatusarrayOnline details of each terminal, only contains detailed information of online terminals when status is 1, otherwise it is an empty array.
detailPlatformStatus.platformIDintTerminal type when user logged in
detailPlatformStatus.connIDstringConnection ID
detailPlatformStatus.isBackgroundbooleanIs app in background
detailPlatformStatus.tokenstringtoken info

Failure Return Example

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

Parameter Description for Failure Return Example

Parameter NameTypeDescription
errCodeintError code, specifically check the global error code document
errMsgstringBrief error message
errDlterrDltDetailed error message