# 获取指定扫码号列表
请求方式:POST
请求地址:https://$basehost/gateway/qopen/GetHostAccountByIds
body参数:
{
"host_account_id_list": ["accFNDxF42fxCwwWVWUhBOD", "acc7UirX5VYOmTUu0Dy2wEi"]
}
字段 | 类型 | 必填 | 说明 |
---|---|---|---|
host_account_id_list | array | 是 | 扫码号id列表,最小长度为1,最大长度为100 |
返回值:
{
"data": {
"host_account_list": [
{
"robot_id": "扫码号id",
"user_id": "用户id",
"name": "用户姓名",
"real_name": "用户实名",
"avatar_url": "用户头像url",
"alias": "用户别名",
"sex": 1,
"is_online": true
}
]
},
"errcode": 0,
"errmsg": "",
"hint": ""
}
返回说明
字段 | 类型 | 说明 |
---|---|---|
data | json | json返回值 |
host_account_list | array | 获取到的扫码号列表 |
errcode | int | 状态码,0为正常,非0代表错误 |
errmsg | string | 错误信息 |
hint | string | 请求日志ID |
host_account_list说明
字段 | 类型 | 说明 |
---|---|---|
robot_id | string | 扫码号id |
user_id | string | 用户id |
name | string | 用户姓名 |
real_name | string | 用户实名 |
avatar_url | string | 用户头像url |
alias | string | 用户别名 |
sex | int | 用户性别:1男 2女 |
is_online | bool | 是否在线 |
完整请求示例:
curl -X POST \
https://$basehost/gateway/qopen/GetHostAccountByIds \
-H 'Content-Type: application/json; charset=UTF-8' \
-H 'Token: c2NdxDHKXIJ5j1zrhJeq2eJEHjh9xxx' \
-d '{
"host_account_id_list": ["id1", "id2"],
}'