# 异步获取企业员工列表
每次请求,会同步异步回调的方式,分成多次回调,给出全量的数据 该接口用于获取企业通讯录可见范围的员工列表信息
请求方式:POST
请求地址:https://$basehost/gateway/qopen/GetCompanyAccountListAsync
body参数:
{
"offset": 0,
"mark_id": "标识某一次请求"
}
字段 | 类型 | 必填 | 说明 |
---|---|---|---|
mark_id | string | 否 | 标识某一次请求 |
处理结果,异步返回值:
{
"event_type": 42017,
"err_code": 0,
"err_msg": "success",
"data": {
"has_more": true,
"account_list": [
{
"account_id": "员工id",
"account_type": 2,
"profile": {
"gender": 2,
"name": "",
"avatar": "头像url",
"ww_user_id": "",
"alias": "",
}
}
]
}
}
返回说明
字段 | 类型 | 说明 |
---|---|---|
event_type | int | 事件类型,420167 |
err_code | int | 状态码,0为正常,非0代表错误 |
err_msg | string | 错误信息 |
has_more | bool | 是否还有更多 |
account_list | array | 获取到的客户列表 |
mark_id | string | 标识某一次请求 |
account_list说明
字段 | 类型 | 说明 | |
---|---|---|---|
account_id | string | 客户id | |
account_type | int | 客户类型:0:客户类型未知,1=员工,2=微信外部联系人,3=企业微信外部联系人 | |
profile | object | 详细信息 |
profile说明
字段 | 类型 | 说明 |
---|---|---|
name | string | 姓名 |
alias | string | 别名 |
avatar | string | 头像 |
gender | int | 性别:1=男,2=女,0=未知 |
ww_user_id | string | 企业微信id |
完整请求示例:
curl -X POST \
https://$basehost/gateway/qopen/GetCompanyAccountListAsync \
-H 'Content-Type: application/json; charset=UTF-8' \
-H 'Token: c2NdxDHKXIJ5j1zrhJeq2eJEHjh9xxx' \
-d '{
"mark_id": ""
}'
← 获取企业员工列表 获取企业管理员(平台号) →