主题模式
开放接口
使用开放接口前,请先阅读《接入说明》
获取开放平台token
/wechat/get_component_token
公共参数
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| component_appid | String | 是 | wx3a67b967164b59d1 | 开放平台的APPID |
| sign | String | 是 | 参考接入说明 | 数据签名 |
| timestamp | String | 是 | 1741281751 | 时间戳(秒) |
业务参数
无
响应示例
json
{
"code": 200,
"message": "success",
"data": {
"component_appid": "wx3a67b967164b59d1",
"component_access_token": "90_7hoULS5Nxd7Fonz6EJatuqYilvUAHDuhIbF2Qk7iKcacBOrrL08Q0-q2BJTWzlrOMI8Cw32jH-07B3lW49Cj1VG7WbE48o6T274LRVWUSDYcXETrep3fs3mcE28DSOhADAUJF"
}
}获取授权应用token
/wechat/get_authorizer_token
公共参数
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| component_appid | String | 是 | wx3a67b967164b59d1 | 开放平台的APPID |
| sign | String | 是 | 参考接入说明 | 数据签名 |
| timestamp | String | 是 | 1741281751 | 时间戳(秒) |
业务参数
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| authorizer_appid | String | 是 | - | 授权应用的appid |
| return_component_token | Int | 否 | 1 | 需要同时返回平台token 1是 0否 |
响应示例
json
{
"code": 200,
"message": "success",
"data": {
"authorizer_appid": "wx1f5bef27cc9f956a",
"authorizer_access_token": "90_Z_8carzenkLxpxJOA-jJrg-S_aMO26TGXEdP-Cj37Xy0BXr6brqaYMpeXjqJCihQd73luMbmIrVLVh_LT2FtH1PPtnm3OxOZWA42tgesCGZIn_By5PO4yMrrpSEKjepTRWZ_rhFlnGQtsDXKNPVhADDZBH",
"component_appid": "wx3a67b967164b59d1",
"component_access_token": "90_7hoULS5Nxd7Fonz6EJatuqYilvUAHDuhIbF2Qk7iKcacBOrrL08Q0-q2BJTWzlrOMI8Cw32jH-07B3lW49Cj1VG7WbE48o6T274LRVWUSDYcXETrep3fs3mcE28DSOhADAUJF"
}
}修改授权应用分类
/wechat/update_authorizer_category
公共参数
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| component_appid | String | 是 | wx3a67b967164b59d1 | 开放平台的APPID |
| sign | String | 是 | 参考接入说明 | 数据签名 |
| timestamp | String | 是 | 1741281751 | 时间戳(秒) |
业务参数
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| authorizer_appid | String | 是 | wx1f5bef27cc9f956a | 授权应用的appid |
| category_name | String | 是 | 默认客户 | 分类名称;同名分类存在时直接使用,不存在时自动创建 |
请求示例
json
{
"authorizer_appid": "wx1f5bef27cc9f956a",
"category_name": "默认客户"
}响应示例
json
{
"code": 200,
"message": "success",
"data": {
"authorizer_appid": "wx1f5bef27cc9f956a",
"category_id": 12,
"category_name": "默认客户"
}
}获取授权应用详情
/wechat/get_authorizer_detail
公共参数
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| component_appid | String | 是 | wx3a67b967164b59d1 | 开放平台的APPID |
| sign | String | 是 | 参考接入说明 | 数据签名 |
| timestamp | String | 是 | 1741281751 | 时间戳(秒) |
业务参数
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| authorizer_appid | String | 是 | wx1f5bef27cc9f956a | 授权应用的appid |
请求示例
json
{
"authorizer_appid": "wx1f5bef27cc9f956a"
}响应说明
返回授权应用基本信息、分类信息、扩展配置和开放接口专用小程序详情信息
响应示例
json
{
"code": 200,
"message": "success",
"data": {
"id": 1,
"component_appid": "wx3a67b967164b59d1",
"authorizer_appid": "wx1f5bef27cc9f956a",
"category_id": 12,
"app_type": 1,
"service_type": 0,
"service_type_str": "普通小程序",
"nick_name": "示例小程序",
"user_name": "gh_xxxxxxxxxxxx",
"head_img": "https://wx.qlogo.cn/...",
"principal_name": "示例主体",
"register_type": 0,
"account_status": 1,
"is_phone": 1,
"is_email": 1,
"verify_info": 0,
"verify_type_str": "微信认证",
"auth_time": "2026-05-27 10:00:00",
"signature": "示例小程序介绍",
"category": {
"id": 12,
"category_name": "默认客户"
},
"config": {
"authorizer_appid": "wx1f5bef27cc9f956a",
"ext_json": "{\"extAppid\":\"wx1f5bef27cc9f956a\"}",
"audit_status": 5,
"audit_version": null,
"release_version": "1.0.0"
},
"version": {
"release_info": {
"release_version": "1.0.0",
"release_time": 1779876000,
"release_desc": "正式版说明",
"release_qrcode": "data:image/png;base64,..."
},
"audit_info": {
"status": 5
},
"exp_info": {
"exp_version": "1.0.1",
"exp_time": 1779879600,
"exp_desc": "体验版说明",
"exp_qrcode": "data:image/png;base64,..."
}
},
"icp_status": {
"errcode": 0,
"errmsg": "ok",
"info": {
"status": 6,
"available": false,
"is_canceling": false,
"sms_verify_status": 2,
"audit_data": []
}
}
}
}获取开放平台授权链接
/wechat/get_auth_url
公共参数
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| component_appid | String | 是 | wx3a67b967164b59d1 | 开放平台的APPID |
| sign | String | 是 | 参考接入说明 | 数据签名 |
| timestamp | String | 是 | 1741281751 | 时间戳(秒) |
业务参数
无
响应示例
json
{
"code": 200,
"message": "success",
"data": {
"pc_url": "https://partner.isvapi.com/html/redirect.html?target=https%3A%2F%2Fmp.weixin.qq.com%2Fcgi-bin%2Fcomponentloginpage%3Fcomponent_appid%3Dwx3a67b967164b59d1%26pre_auth_code%3Dpreauthcode%40%40%40ama66uX0pAE5pGYz6gpXCrHHH-QOSShE9IBEyfx3eci5iXZp_YUsrlamNdItGKtdlYAlUUogHiv42ZaIUFxbWg%26redirect_uri%3Dhttps%3A%2F%2Fpartner.isvapi.com%2Fhtml%2Fsuccess.html%3Ftarget%3D%26auth_type%3D2",
"mobile_url": "https://partner.isvapi.com/html/redirect.html?target=https%3A%2F%2Fopen.weixin.qq.com%2Fwxaopen%2Fsafe%2Fbindcomponent%3Faction%3Dbindcomponent%26no_scan%3D1%26component_appid%3Dwx3a67b967164b59d1%26pre_auth_code%3Dpreauthcode%40%40%40ama66uX0pAE5pGYz6gpXCrHHH-QOSShE9IBEyfx3eci5iXZp_YUsrlamNdItGKtdlYAlUUogHiv42ZaIUFxbWg%26redirect_uri%3Dhttps%3A%2F%2Fpartner.isvapi.com%2Fhtml%2Fsuccess.html%3Ftarget%3D%26auth_type%3D2%23wechat_redirect"
}
}服务商代注册小程序
/wechat/register_mini_program
公共参数
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| component_appid | String | 是 | wx3a67b967164b59d1 | 开放平台的APPID |
| sign | String | 是 | 参考接入说明 | 数据签名 |
| timestamp | String | 是 | 1741281751 | 时间戳(秒) |
业务参数
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| name | String | 是 | xxx有限公司 | 企业名称 |
| code | String | 是 | xxxxxxxx | 企业代码 |
| component_phone | String | 是 | 13188888888 | 服务商联系电话 |
响应示例
json
{
"errcode": 0, // 状态码,0成功,其他失败
"errmsg": "OK", // 错误信息
"taskid": "6xxxxxxxxxxc209d", // 任务id,后面query查询需要用到
"authorize_url": "https://mp.weixin.qq.com/xxxx", // 给用户扫码认证的验证url
"status": 0 // 任务的状态
}服务商代创建试用小程序
/wechat/create_trial_mini_program
公共参数
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| component_appid | String | 是 | wx3a67b967164b59d1 | 开放平台的APPID |
| sign | String | 是 | 参考接入说明 | 数据签名 |
| timestamp | String | 是 | 1741281751 | 时间戳(秒) |
业务参数
| 参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
|---|---|---|---|---|
| name | String | 是 | 小麦烤鸡 | 小程序名称 |
| openid | String | 是 | oK8Yg5YaUM-axuE_vVZmV_oIZxxx | 微信用户的openid 不是微信号 |
响应示例
json
{
"code": 200,
"message": "success",
"data": {
"errcode": 0,
"errmsg": "ok",
"unique_id": "BV8ToNpYUMSeoRgsDi7-_cyo2hMtcbJN4fDPEdOKAGSResiIK8VefChe6UkNhxOi",
"authorize_url": "https://mp.weixin.qq.com/wxawap/fastregistertpbeta?action=show&create_token=BV8ToNpYUMSeoRgsDi7-_cyo2hMtcbxxxxxxxxxxxIK8VefChe6UkNhxOi#wechat_redirect"
}
}