开发

兼容小程序查询接口

接口功能

查询宿主支持的小程序

URL

https://openapi.baidu.com/rest/2.0/smartapp/osa/func/applist

调用方式

POST

是否可重入

参数说明

参数名 类型 必填 说明
union_sign String 签名,生成方式见签名说明
union_timestamp Long 时间戳,时间标准为 UTC ,取当前请求时间(精确到秒)
union_nocestr String 随机字符串,每次请求生成一个新的随机字符串,随机串长度不能超过 64 位,可以有数字、字母、连接符、- 组成
access_token String access_token

请求体说明

参数名 类型 必填 说明
hostVersion String APP 版本
swansdkVersion String swansdk 版本
osType Byte 端类型。1:Android ,2: iOS
appKey List 支持多个小程序 Appkey ,最多支持 50 个
pageSize Integer 页大小,最大为 200
pageNo Integer 页码

请求体示例 POST/JSON

1
2
3
4
5
6
7
8
{
"appKey": ["HlNQXnNIrUGYS6ktAGIZvGoLI0Gv7yVS","W6pzWzwAoE13GaDvV9nRKXgGHt1FiWDI"],
"osType": 2,
"pageNo": 1,
"pageSize": 10,
"hostVersion":"4.22.0.0",
"swansdkVersion":"2.21.0"
}

返回字段

Data Object 说明

字段 类型 描述
dataList List 支持小程序列表
hasMore Int 0:没有更多,1:表示还有更多
total Int 总页数

dataList 说明

参数名 类型 说明
osType Int 端类型。1:Android,2:iOS
appKey String 小程序 Key

返回示例

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"errno": 0,
"msg": "success",
"timestamp": 1606829456,
"data": {
"total": 2,
"dataList": [
{
"osType": 2,
"appKey": "W6pzWzwAoE13GaDvV9nRKXgGHt1FiWDI"
},
{
"osType": 2,
"appKey": "HlNQXnNIrUGYS6ktAGIZvGoLI0Gv7yVS"
}
],
"hasMore": 0
},
"request_id": "aa5f84a9e12544a79d9c469f3e629768"
}