获取企业成员列表,支持查询正常成员和已移除成员。
users:read
|
参数 |
类型 |
是否必填 |
默认值 |
描述 |
|---|---|---|---|---|
page |
int | 否 | 1 |
需返回的页数。 |
page_size |
int | 否 | 100 |
每页返回的成员数量,最多 500 条。 |
include_removed |
bool | 否 | false |
是否包含已移除成员。默认仅返回正常成员;设置为 true 时,同时返回正常成员和已移除成员。 |
该接口独有的响应参数如下,参数位于 data.items[] 中。通用响应参数参考此文档。
|
参数 |
类型 |
描述 |
|---|---|---|
user_id |
int64 | 成员的 ID。 |
user_id_str |
string | 成员 ID 的字符串形式 |
user_name |
string | 成员的名称。 |
email |
string | 成员的邮箱。 |
|
|
string |
成员的角色:
|
|
|
string |
成员账号的状态:
|
join_time |
int64 | 成员加入企业的时间(毫秒时间戳)。 |
curl -X GET "${HOST}/openapi/v1/users?page=1&page_size=100&include_removed=true" \
-H "Authorization: Bearer ${ACCESS_TOKEN}"
{
"code": 0,
"message": "success",
"request_id": "021xxxxxxxxx",
"data": {
"items": [
{
"user_id": 123456,
"user_id_str": "123456",
"user_name": "zhangsan",
"email": "zhangsan@example.com",
"role": "admin",
"status": "removed",
"join_time": 1700000000000
}
],
"pagination": {
"page": 1,
"page_size": 100,
"total": 1,
"total_pages": 1
}
}
}