# 获取扫码号列表
请求方式:POST
请求地址:https://$basehost/gateway/qopen/GetHostAccountList
body参数:
{
"offset": 0,
"limit": 10
}
字段 | 类型 | 必填 | 说明 |
---|---|---|---|
offset | int | 是 | 每次获取的的开始位置,最小值为0 |
limit | int | 是 | 每次获取的条数,取值范围(1~100) |
返回值:
{
"data": {
"has_more": true,
"host_account_list": [
{
"robot_id": "扫码号id",
"user_id": "用户id",
"name": "用户姓名",
"real_name": "用户实名",
"avatar_url": "用户头像url",
"alias": "用户别名",
"sex": 1,
"is_online": true,
"joining_time": 1000000075,
"open_robot_range": 1
}
]
},
"errcode": 0,
"errmsg": "",
"hint": ""
}
返回说明
字段 | 类型 | 说明 |
---|---|---|
data | json | json返回值 |
has_more | bool | 是否还有更多 |
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 | 是否在线 |
joining_time | int | 成员绑定端口时间 |
open_robot_range | int | 机器人类型:1 普通平台号,2 普通扫码号,3 企客宝客户端,4 商家手机托管号,5 鲸域托管号 |
完整请求示例:
curl -X POST \
https://$basehost/gateway/qopen/GetHostAccountList \
-H 'Content-Type: application/json; charset=UTF-8' \
-H 'Token: c2NdxDHKXIJ5j1zrhJeq2eJEHjh9xxx' \
-d '{
"offset": 0,
"limit": 10
}'