Skip to content

批量查询用户

适用版本>=v7.0.2504b.20250424

接口说明:基于user_id数组批量查询用户

标签通讯录

请求说明

字段
请求地址
配置域名+/openapi+/v7/users/batch_read
HTTP 方法
POST
接口描述
基于user_id数组批量查询用户(调用 创建用户 接口后可从返回结果中获取到用户id;有诸多查询用户信息的API可获取部门id字段,如 获取当前用户信息),支持查询当前企业用户,仅支持应用身份,私网支持查询外部联系人
签名方式
KSO-1(配置域名+/openapi不参与签名)
限频策略
权限要求
查询和管理通讯录信息(应用授权) kso.contact.readwrite
查询通讯录信息(应用授权) kso.contact.read
查询和管理通讯录信息(用户授权) kso.contact.readwrite
查询通讯录信息(用户授权) kso.contact.read

请求头 (Headers)

属性名类型是否必填描述可选值
X-Kso-Id-Type
string类型
* internal - 内部
* external - 外部
internal, external
X-Kso-Date
stringRFC1123 格式的日期,例: Wed, 23 Jan 2013 06:43:08 GMT-
X-Kso-Authorization
stringKSO-1 签名值,详见《签名方法》-
Authorization
string授权凭证,格式为:Bearer {access_token}-

请求体(Body)

请求体格式: application/json

没有可用的数据

请求体示例

json
{
  "status": [
    "string"
  ],
  "user_ids": [
    "string"
  ],
  "with_dept": true
}

响应体(Response)

HTTP状态码: 200
响应体格式: application/json

没有可用的数据

响应体示例

json
{
  "data": {
    "items": [
      {
        "city": "string",
        "country": "string",
        "ctime": 0,
        "def_dept_id": "string",
        "depts": [
          {
            "abs_path": "string",
            "dept_id": "string",
            "id": "string",
            "is_def_dept": true,
            "is_leader": true,
            "name": "string",
            "order": 0
          }
        ],
        "email": "string",
        "employee_id": "string",
        "employer": "string",
        "employment_status": "string",
        "employment_type": "string",
        "ex_user_id": "string",
        "gender": "string",
        "id": "string",
        "leader_id": "string",
        "login_name": "string",
        "phone": "string",
        "role": "string",
        "source": "inner",
        "status": "string",
        "telephone": "string",
        "title": "string",
        "titles": {
          "mode": "general",
          "title_list": [
            {
              "dept": {
                "abs_path": "string",
                "id": "string",
                "name": "string"
              },
              "id": "string",
              "name": "string"
            }
          ]
        },
        "type_v2": "company_member",
        "user_name": "string",
        "work_place": "string"
      }
    ]
  },
  "code": 0,
  "msg": "string"
}