Skip to content
POST{BASE_URL}/api/corp/batchGetAppInfo
只读已实测企业应用JSON · Bearer 调用凭证 · body appid

批量获取应用信息 ​

查询企业应用的详细信息(名称、图标、开关状态等)。

说明与注意 ​

  • 要拿到列表必须传 isGetAll: true;只传 appIdList 返回空 data。
  • 示例里没列进字段表的字段原样保存即可。

请求参数 ​

参数必填类型说明
appid是string实例 appid,标识操作哪个已登录账号。示例:we_xxxxxxxxxxxxxxx
newApp否boolean传 true 返回全部应用;不传只返回 2 条。示例:true
isGetAll否boolean传 true 才返回列表。示例:true
appIdList否array<int64>普通应用 id 列表;单独传不返回数据,用 isGetAll 拉全部后自己筛
businessIdList否array<int64>系统业务应用 id 列表,取自同步企业应用列表的 metaList[].businessId
needTemplateInfo否boolean是否返回模板信息;开与不开结果一样

请求示例 ​

http
POST {BASE_URL}/api/corp/batchGetAppInfo
Authorization: Bearer <你的调用凭证>
Content-Type: application/json

{
  "appid": "we_xxxxxxxxxxxxxxx",
  "newApp": true,
  "isGetAll": true
}
bash
curl -X POST '{BASE_URL}/api/corp/batchGetAppInfo' \
  -H 'Authorization: Bearer <你的调用凭证>' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "appid": "we_xxxxxxxxxxxxxxx",
  "newApp": true,
  "isGetAll": true
}'
python
import requests

url = "{BASE_URL}/api/corp/batchGetAppInfo"
headers = {"Authorization": "Bearer <你的调用凭证>", "Content-Type": "application/json"}
body = """{
  "appid": "we_xxxxxxxxxxxxxxx",
  "newApp": true,
  "isGetAll": true
}"""

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}/api/corp/batchGetAppInfo";
String body = "{\n" +
    "  \"appid\": \"we_xxxxxxxxxxxxxxx\",\n" +
    "  \"newApp\": true,\n" +
    "  \"isGetAll\": true\n" +
    "}";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder(URI.create(url))
    .header("Authorization", "Bearer <你的调用凭证>")
    .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}/api/corp/batchGetAppInfo';
$body = <<<'JSON'
{
  "appid": "we_xxxxxxxxxxxxxxx",
  "newApp": true,
  "isGetAll": true
}
JSON;

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

响应示例 ​

json
{
  "code": 0,
  "data": {
    "appList": [
      {
        "corpId": 1970320000000001,
        "appId": 5629500422244800,
        "appOpenId": 2000003,
        "name": "微信联系人",
        "imgid": "https://p.qlogo.cn/bizmail/<图标>/0",
        "desc": "",
        "menuInfo": {},
        "homeInfo": "",
        "lastModTime": 1785983453,
        "reportLocFlag": 0,
        "appOpen": true,
        "isReportOpen": false,
        "isFromQyhApi": false,
        "controlOpenState": 0,
        "groupId": 0,
        "groupName": "",
        "groupOrder": 1073741824,
        "openState": 1,
        "specialAttr": {
          "diskDispType": 0,
          "isDiskEncrypt": 0,
          "encryptMaxSize": 0,
          "bbsForbidShare": false,
          "qqDocShareLimit": 0,
          "qqDocShareExpire": 1,
          "qqDocShareWatermark": 1,
          "field13": 0,
          "refundState": 0,
          "b2BAppMemberHideInt": 2,
          "qyPayMemberNotAllowAddAccount": 0
        },
        "stat": 0,
        "documentHandle": {
          "isDocumentHandleOpen": false
        },
        "app3RdOpenFlag": 0,
        "crmInfo": {},
        "appExtraInfoString": "<base64>"
      }
    ]
  },
  "detail": "",
  "message": "ok",
  "time": "2026-11-10 18:07:17"
}

响应字段 ​

响应字段(19 项)
字段类型说明
codeint64统一封套状态码:0=成功,负数=失败
dataobject查询结果
data.appListarray<object>应用列表,查到几个返回几个
data.appList[].corpIdint64企业 id
data.appList[].appIdint64普通应用 id
data.appList[].namestring应用名称
data.appList[].imgidstring应用图标地址
data.appList[].descstring应用简介
data.appList[].appOpenboolean是否开启
data.appList[].openStateint640 关闭、1 开启
data.appList[].lastModTimeint64最后修改时间,秒级时间戳
data.appList[].appOpenIdint64应用 openId
data.appList[].controlOpenStateint64管控开关;和同步企业应用列表里的同名字段含义不同
data.appList[].groupOrderint64分组排序值
data.appList[].specialAttrobject网盘、文档等特殊属性,原样保存即可
data.appList[].appExtraInfoStringstring扩展信息,base64 透传串,不需要解析
detailstring附加明细,通常为空
messagestring文案:成功为 ok;失败形如 -码|描述
timestring服务端处理时间 YYYY-MM-DD HH:MM:SS

下一步 ​