Appearance
批量获取应用信息
查询企业应用的详细信息(名称、图标、开关状态等)。
说明与注意
- 要拿到列表必须传
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 项)
| 字段 | 类型 | 说明 |
|---|---|---|
code | int64 | 统一封套状态码:0=成功,负数=失败 |
data | object | 查询结果 |
data.appList | array<object> | 应用列表,查到几个返回几个 |
data.appList[].corpId | int64 | 企业 id |
data.appList[].appId | int64 | 普通应用 id |
data.appList[].name | string | 应用名称 |
data.appList[].imgid | string | 应用图标地址 |
data.appList[].desc | string | 应用简介 |
data.appList[].appOpen | boolean | 是否开启 |
data.appList[].openState | int64 | 0 关闭、1 开启 |
data.appList[].lastModTime | int64 | 最后修改时间,秒级时间戳 |
data.appList[].appOpenId | int64 | 应用 openId |
data.appList[].controlOpenState | int64 | 管控开关;和同步企业应用列表里的同名字段含义不同 |
data.appList[].groupOrder | int64 | 分组排序值 |
data.appList[].specialAttr | object | 网盘、文档等特殊属性,原样保存即可 |
data.appList[].appExtraInfoString | string | 扩展信息,base64 透传串,不需要解析 |
detail | string | 附加明细,通常为空 |
message | string | 文案:成功为 ok;失败形如 -码|描述 |
time | string | 服务端处理时间 YYYY-MM-DD HH:MM:SS |