主题模式
开放接口
使用开放接口前,请先阅读《接入说明》
获取开放平台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/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 | 企业代码 |
| code_type | Number | 是 | 1 | 企业代码类型 1:统一社会信用代码(18 位) 2:组织机构代码(9 位 xxxxxxxx-x) 3:营业执照注册号(15 位) |
| legal_persona_wechat | String | 是 | chunboo | 法人微信 |
| legal_persona_name | String | 是 | 刘xx | 法人姓名 |
| component_phone | String | 是 | 13188888888 | 服务商联系电话 |
响应示例
json
{
"code": 200,
"message": "success",
"data": {
"errcode": 0, // 状态码,0成功,其他失败
"errmsg": "OK" // 错误信息
}
}服务商代创建试用小程序
/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"
}
}