# 获取平台号列表
请求方式:POST
请求地址:https://$basehost/gateway/qopen/GetPlatformRobotList
body参数:
{
"offset": 0,
"limit": 10
}
字段 | 类型 | 必填 | 说明 |
---|---|---|---|
offset | int | 是 | 每次获取的的开始位置,最小值为0 |
limit | int | 是 | 每次获取的条数,取值范围(1~100) |
返回值:
{
"data": {
"has_more": true,
"robot_list": [
{
"robot_id": "平台号id",
"user_id": "企业微信id",
"name": "姓名",
"real_name": "真实姓名",
"avatar_url": "头像url",
"alias": "别名",
"sex": 0,
"email": "邮箱",
"qrcode": "名片url",
"joining_time": 1000000000
}
]
},
"errcode": 0,
"errmsg": "",
"hint": ""
}
返回说明
字段 | 类型 | 说明 |
---|---|---|
data | json | json返回值 |
has_more | bool | 是否还有更多 |
robot_list | array | 获取到的平台号列表 |
errcode | int | 状态码,0为正常,非0代表错误 |
errmsg | string | 错误信息 |
hint | string | 请求日志ID |
robot_list说明
字段 | 类型 | 说明 |
---|---|---|
robot_id | string | 平台号id |
user_id | string | 企业微信id |
name | string | 姓名 |
real_name | string | 真实姓名 |
avatar_url | string | 头像url |
alias | string | 别名 |
sex | int | 性别:0=未知,1=男,2=女 |
string | 邮箱 | |
qrcode | string | 名片url,注意:该接口只返回缓存数据,不会主动更新,不保证有效,如需最新链接,请使用获取机器人二维码接口 |
joining_time | int | 加入企业的时间 |
完整请求示例:
curl -X POST \
https://$basehost/gateway/qopen/GetPlatformRobotList \
-H 'Content-Type: application/json; charset=UTF-8' \
-H 'Token: c2NdxDHKXIJ5j1zrhJeq2eJEHjh9xxx' \
-d '{
"offset": 0,
"limit": 10
}'