批量获取账号在线状态
开发中
POST
/im/v2/users/actions/onlineStatus
请求参数
Header 参数
AppKey
string
必需
默认值:
{{AppKey}}
X-custom-traceid
string
可选
默认值:
{% mock 'uuid' %}
Nonce
string
必需
默认值:
{{Nonce}}
CurTime
string
必需
默认值:
{{CurTime}}
CheckSum
string
必需
默认值:
{{CheckSum}}
Body 参数application/json
account_ids
array[string]
云信账号列表
最大账号个数:100
示例
{
"account_ids": [
"string"
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://open.yunxinapi.com/im/v2/users/actions/onlineStatus' \
--header 'AppKey;' \
--header 'X-custom-traceid: {% mock '\''uuid'\'' %}' \
--header 'Nonce;' \
--header 'CurTime;' \
--header 'CheckSum;' \
--header 'Content-Type: application/json' \
--data-raw '{
"account_ids": [
"string"
]
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
msg
string
必需
data
object
必需
success_list
array [object {2}]
查询成功的账号列表
failed_list
array [object {3}]
查询失败的账号列表
示例
{
"code": 0,
"msg": "string",
"data": {
"success_list": [
{
"account_id": "string",
"online_status": [
{
"client_type": 0,
"login_time": 0
}
]
}
],
"failed_list": [
{
"account_id": "string",
"error_code": 0,
"error_msg": "string"
}
]
}
}
🟢200成功
🟢200请求参数错误
🟢200服务器错误