GEThttps://api.account.tencentid.com/openapi/v3/contacts/departments/:department_id/direct_usersignore_status 参数默认不忽略状态(即仅返回正常状态用户);page_token 获取后续页数据。名称 | 类型 | 必填 | 描述 |
Authorization | string | 是 | 值格式: Bearer {{access_token}} 支持鉴权类型: |
Content-Type | string | 是 | 固定值: application/json; charset=utf-8 |
名称 | 类型 | 必填 | 描述 |
department_id | string | 是 | 部门 id 示例值:"13580**************31" |
名称 | 类型 | 必填 | 描述 |
page_size | int | 是 | 分页大小,取值范围 [10, 2000]。 示例值:10 |
page_token | string | 否 | 分页 token,默认查询第一页;后续页需传入上一页返回的 page_token |
ignore_status | bool | 否 | 是否忽略状态,默认 False(不忽略,仅返回正常状态用户)True:不论用户状态均返回 False:仅返回正常状态用户 示例值:False |
参数名称 | 类型 | 描述 |
users | array<object> | 用户列表(精简结构) |
└ union_id | string | 用户 union_id |
└ name | string | 姓名 |
└ status | string | 用户状态 |
└ is_main_department | bool | 是否主部门 |
trace_id | string | 唯一请求 ID |
GET https://api.account.tencentid.com/openapi/v3/contacts/departments/13580************31/direct_users?page_size=10Authorization: Bearer {access_token}
{"code": 0,"msg": "ok","trace_id": "cd8a67683e50a4e81d8db195c6bd0bff","data": {"users": [{"name": "张三","status": "Enabled","union_id": "13833************36","is_main_department": true},{"name": "李四","status": "Enabled","union_id": "14035************72","is_main_department": true},{"name": "王五","status": "Enabled","union_id": "14560************15","is_main_department": true}]}}
{"code": 10030,"msg": "[pageSize]页面大小不正确","data": null}
错误码 | 描述 |
200001 | 用户不存在 |
201001 | 部门【%s】不存在 |
202011 | 部门或用户【%s】不存在 |
10030 | 参数不正确(page_size 缺失或越界,HTTP 400) |
文档反馈