Skip to content
POST{BASE_URL}/wx-api/api/personal/getInfo
只读实测 2026-09-06个人信息JSON · Bearer App Token · body appid

获取个人信息

读取当前登录账号的资料全集——实例展示昵称/头像/企业名、消息 fromUser 匹配、判断实名等都靠它。是本类最重要的只读接口。

说明与注意

  • 账号 id = uin(int64),名字 = name,头像 = iconUrl,企业 = corpId(数字);已脱敏 mobile/realName。

请求参数

参数必填类型说明
appidstring实例 appid,标识操作哪个已登录账号。示例:we_xxxxxxxxxxxxxxx

请求示例

http
POST {BASE_URL}/wx-api/api/personal/getInfo
Authorization: Bearer <你的 App Token>
Content-Type: application/json

{
  "appid": "we_xxxxxxxxxxxxxxx"
}
bash
curl -X POST '{BASE_URL}/wx-api/api/personal/getInfo' \
  -H 'Authorization: Bearer <你的 App Token>' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "appid": "we_xxxxxxxxxxxxxxx"
}'
python
import requests

url = "{BASE_URL}/wx-api/api/personal/getInfo"
headers = {"Authorization": "Bearer <你的 App Token>", "Content-Type": "application/json"}
body = """{
  "appid": "we_xxxxxxxxxxxxxxx"
}"""

resp = requests.post(url, headers=headers, data=body.encode("utf-8"))
print(resp.text)
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

String url = "{BASE_URL}/wx-api/api/personal/getInfo";
String body = "{\n" +
    "  \"appid\": \"we_xxxxxxxxxxxxxxx\"\n" +
    "}";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder(URI.create(url))
    .header("Authorization", "Bearer <你的 App Token>")
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString(body))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
php
<?php

$url = '{BASE_URL}/wx-api/api/personal/getInfo';
$body = <<<'JSON'
{
  "appid": "we_xxxxxxxxxxxxxxx"
}
JSON;

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer <你的 App Token>',
    'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;

响应示例

json
{
  "code": 0,
  "data": {
    "uin": 1688855440457534,
    "name": "哈哈哈",
    "emailAddr": "",
    "birthday": "2000-09-01 12:00:00",
    "mobile": "177****2663",
    "phone": "",
    "job": "",
    "number": "",
    "gender": 1,
    "iconUrl": "https://wework.qpic.cn/wwpic/450926_GsZ9MQliR-K3gHt_1697180185/0",
    "corpId": 1970325156983916,
    "attr": 177209664,
    "dispOrder": 0,
    "bizUin": 1,
    "position": "",
    "alias": "测试下",
    "mainPartyId": 1688857997391345,
    "gid": 2251800393707302,
    "isNameVerified": true,
    "internationCode": "86",
    "bindEmailStatus": 1,
    "englishName": "ZhangZhiXing",
    "customInfo": {},
    "nameVerifyStatus": 1,
    "realName": "张**",
    "vCorpUseStatus": 1000,
    "holidayInfo": {
      "holidayStatus": 0,
      "holidayDesc": "",
      "oldHolidayIconIndex": 0,
      "createTime": 0,
      "holidayInfoId": 0,
      "holidayIconIndex": 0,
      "holidayGenerateSrc": 0,
      "holidayStatusNew": 0,
      "vacationSyncType": 0
    },
    "xcxStyle": 0,
    "xcxCorpAddress": "5rWZ5rGf5aSn5aSPMjEzMjEzMjEzMjEzMTIzMTI=",
    "attr2": 1041367168,
    "tencentInfo": {},
    "isSyncInnerPosition": true,
    "unionId": "ozynqslW2bdBrXxDMs3NgT8qvpLw",
    "vCode": "vcbda9d6adafd0a2ef",
    "personalWorkType": 0,
    "superiors": [
      {}
    ],
    "bizMail": "zhangzhixing@xzwbtwlkjyxgs.wecom.work",
    "attr3": 0,
    "collegeIdentity": 0,
    "mobileAreaCode": 0
  },
  "detail": "",
  "message": "ok",
  "time": "2026-09-06 11:26:14"
}

响应字段

响应字段(54 项)
字段类型说明
codeint64统一封套状态码:0=成功,负数=失败
dataobject业务数据
data.uinint64用户唯一 id(int64,注意精度)
data.namestring昵称 / 显示名
data.emailAddrstring个人邮箱
data.birthdaystring生日 YYYY-MM-DD HH:MM:SS
data.mobilestring手机号(示例已脱敏)
data.phonestring电话(外部对象常为空)
data.jobstring职位 / 职务
data.numberstring工号
data.genderint64性别(1 男 / 2 女)
data.iconUrlstring头像 url
data.corpIdint64所属企业唯一 id
data.attrint64属性位掩码(bitmask),各 bit 含义待确认
data.dispOrderint64通讯录 / 部门内显示排序
data.bizUinint64企业 uin,含义待确认
data.positionstring职位 / 职务
data.aliasstring别名 / 花名
data.mainPartyIdint64主部门 id
data.gidint64全局 id(跨企业标识),含义待确认
data.isNameVerifiedboolean是否已实名认证
data.internationCodestring国际区号,如 86
data.bindEmailStatusint64邮箱绑定状态(观测到 2=已绑定 / 1),枚举待确认
data.englishNamestring英文名
data.customInfoobject自定义字段集合(常为空对象)
data.nameVerifyStatusint64实名认证状态(观测 1
data.realNamestring实名(示例已脱敏)
data.vCorpUseStatusint64企业使用状态(观测 1000),含义待确认
data.holidayInfoobject休假信息(holidayStatus/holidayDesc/... )
data.holidayInfo.holidayStatusint64假期状态 / 新版假期状态
data.holidayInfo.holidayDescstring假期描述文案
data.holidayInfo.oldHolidayIconIndexint64假期头像挂件索引 / 旧索引
data.holidayInfo.createTimeint64建立 / 更新时间戳(秒)
data.holidayInfo.holidayInfoIdint64假期信息 id
data.holidayInfo.holidayIconIndexint64假期头像挂件索引 / 旧索引
data.holidayInfo.holidayGenerateSrcint64假期来源(含义待确认)
data.holidayInfo.holidayStatusNewint64假期状态 / 新版假期状态
data.holidayInfo.vacationSyncTypeint64holidayInfo 内新增字段:休假同步类型(实测 0)。
data.xcxStyleint64小程序名片样式,含义待确认
data.xcxCorpAddressstring小程序名片-企业地址,base64 编码(如 5rWZ5rGf5aSn5aSP...→「浙江大夏...」)。
data.attr2int64属性位掩码(bitmask),各 bit 含义待确认
data.tencentInfoobject腾讯生态相关(常为空对象)
data.isSyncInnerPositionboolean是否同步内部职位
data.unionIdstring微信 unionId(跨应用用户标识)
data.vCodestring名片/验证码(形如 vc31f1...
data.personalWorkTypeint64个人工作类型,含义待确认
data.superiorsarray<object>上级链(汇报关系),元素为对象,实测样本中均为 [{}](空对象占位)。
data.bizMailstring企业邮箱
data.attr3int64属性位掩码(bitmask),各 bit 含义待确认
data.collegeIdentityint64学校 / 高校身份类型,含义待确认
data.mobileAreaCodeint64手机区号,含义待确认(常为 0)
detailstring附加明细,通常为空
messagestring文案:成功为 ok;失败形如 -码|描述
timestring服务端处理时间 YYYY-MM-DD HH:MM:SS

下一步