1.1. 员工信息

该接口用于获取员工信息

1.1.1. 请求方法

POST api/v1/getUser

1.1.2. 请求参数

参数 是否必须 说明
corpId 企业微信corp_id
userId 成员UserID。对应管理端的帐号,企业内必须唯一。不区分大小写,长度为1~64个字节

1.1.3. 入参示例

{
    "corpId":"wxxxxxxxxxxx078",
    "userid":"xxxxxxxxx"
}

1.1.4. 返回数据

属性名 类型 说明
errcode 整型 返回码
errmsg 字符串 对返回码的文本描述内容
userid 字符串 成员UserID。对应管理端的帐号,企业内必须唯一。不区分大小写,长度为1~64个字节
name 字符串 成员名称;
mobile 字符串 手机号码
department 整型数组 成员所属部门id列表
order 整型数组 部门内的排序值,默认为0。数量必须和department一致
position 字符串 职务信息
gender 整型 性别。0表示未定义,1表示男性,2表示女性
email 字符串 邮箱
biz_mail 字符串 企业邮箱
avatar 字符串 头像url
thumb_avatar 字符串 头像缩略图url
address 字符串 地址

1.1.5. 返回示例

{
  "errcode": 0,
  "errmsg": "ok",
  "userid": "zhangsan",
  "name": "张三",
  "department": [1, 2],
  "order": [1, 2],
  "position": "后台工程师",
  "mobile": "13800000000",
  "gender": "1",
  "email": "zhangsan@gzdev.com",
  "biz_mail":"zhangsan@qyycs2.wecom.work",
  "is_leader_in_dept": [1, 0],
  "direct_leader":["lisi","wangwu"],
  "avatar": "http://wx.qlogo.cn/mmopen/ajNVdqHZLLA3WJ6DSZUfiakYe37PKnQhBIeOQBO4czqrnZDS79FH5Wm5m4X69TBicnHFlhiafvDwklOpZeXYQQ2icg/0",
  "thumb_avatar": "http://wx.qlogo.cn/mmopen/ajNVdqHZLLA3WJ6DSZUfiakYe37PKnQhBIeOQBO4czqrnZDS79FH5Wm5m4X69TBicnHFlhiafvDwklOpZeXYQQ2icg/100",
  "telephone": "020-123456",
  "alias": "jackzhang",
  "address": "广州市海珠区新港中路",
  "open_userid": "xxxxxx",
  "main_department": 1,
  "extattr": {
    "attrs": [
      {
        "type": 0,
        "name": "文本名称",
        "text": {
          "value": "文本"
        }
      },
      {
        "type": 1,
        "name": "网页名称",
        "web": {
          "url": "http://www.test.com",
          "title": "标题"
        }
      }
    ]
  },
  "status": 1,
  "qr_code": "https://open.work.weixin.qq.com/wwopen/userQRCode?vcode=xxx",
  "external_position": "产品经理",
  "external_profile": {
    "external_corp_name": "企业简称",
    "wechat_channels": {
      "nickname": "视频号名称",
      "status": 1
    },
    "external_attr": [{
        "type": 0,
        "name": "文本名称",
        "text": {
          "value": "文本"
        }
      },
      {
        "type": 1,
        "name": "网页名称",
        "web": {
          "url": "http://www.test.com",
          "title": "标题"
        }
      },
      {
        "type": 2,
        "name": "测试app",
        "miniprogram": {
          "appid": "wx8bd80126147dFAKE",
          "pagepath": "/index",
          "title": "my miniprogram"
        }
      }
    ]
  }
}

results matching ""

    No results matching ""