public interface WxOpenComponentService
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
ADD_TO_TEMPLATE_URL |
static String |
API_AUTHORIZER_TOKEN_URL |
static String |
API_COMPONENT_TOKEN_URL |
static String |
API_CREATE_PREAUTHCODE_URL |
static String |
API_GET_AUTHORIZER_INFO_URL |
static String |
API_GET_AUTHORIZER_OPTION_URL |
static String |
API_QUERY_AUTH_URL |
static String |
API_SET_AUTHORIZER_OPTION_URL |
static String |
COMPONENT_LOGIN_PAGE_URL |
static String |
COMPONENT_MOBILE_LOGIN_PAGE_URL
手机端打开授权链接
|
static String |
CONNECT_OAUTH2_AUTHORIZE_URL |
static String |
CREATE_OPEN_URL |
static String |
DELETE_TEMPLATE_URL |
static String |
FAST_REGISTER_WEAPP_SEARCH_URL |
static String |
FAST_REGISTER_WEAPP_URL
快速创建小程序接口
|
static String |
GET_TEMPLATE_DRAFT_LIST_URL
代小程序实现业务
小程序代码模版库管理:https://open.weixin.qq.com/cgi-bin/showdocument?
|
static String |
GET_TEMPLATE_LIST_URL |
static String |
MINIAPP_JSCODE_2_SESSION |
static String |
OAUTH2_ACCESS_TOKEN_URL
用code换取oauth2的access token
|
static String |
OAUTH2_REFRESH_TOKEN_URL
刷新oauth2的access token
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addToTemplate(long draftId)
将草稿箱的草稿选为小程序代码模版
|
boolean |
checkSignature(String timestamp,
String nonce,
String signature) |
boolean |
checkSignature(String appId,
String timestamp,
String nonce,
String signature) |
WxOpenCreateResult |
createOpenAccount(String appId)
https://open.weixin.qq.com/cgi-bin/showdocument?
|
void |
deleteTemplate(long templateId)
删除指定小程序代码模版
|
WxOpenResult |
fastRegisterWeapp(String name,
String code,
String codeType,
String legalPersonaWechat,
String legalPersonaName,
String componentPhone)
https://open.weixin.qq.com/cgi-bin/showdocument?
|
WxOpenResult |
fastRegisterWeappSearch(String name,
String legalPersonaWechat,
String legalPersonaName)
https://open.weixin.qq.com/cgi-bin/showdocument?
|
String |
getAuthorizerAccessToken(String appid,
boolean forceRefresh) |
WxOpenAuthorizerInfoResult |
getAuthorizerInfo(String authorizerAppid)
获取授权方的帐号基本信息
|
WxOpenAuthorizerOptionResult |
getAuthorizerOption(String authorizerAppid,
String optionName)
获取授权方的选项设置信息
|
String |
getComponentAccessToken(boolean forceRefresh) |
String |
getMobilePreAuthUrl(String redirectURI)
获取预授权链接(手机端预授权)
|
String |
getMobilePreAuthUrl(String redirectURI,
String authType,
String bizAppid)
获取预授权链接(手机端预授权)
|
String |
getPreAuthUrl(String redirectURI)
获取用户授权页URL(来路URL和成功跳转URL 的域名都需要为三方平台设置的 登录授权的发起页域名)
|
String |
getPreAuthUrl(String redirectURI,
String authType,
String bizAppid)
authType 要授权的帐号类型:1则商户点击链接后,手机端仅展示公众号、2表示仅展示小程序,3表示公众号和小程序都展示。
|
WxOpenQueryAuthResult |
getQueryAuth(String authorizationCode)
使用授权码换取公众号或小程序的接口调用凭据和授权信息
|
List<WxOpenMaCodeTemplate> |
getTemplateDraftList()
获取草稿箱内的所有临时代码草稿
|
List<WxOpenMaCodeTemplate> |
getTemplateList()
获取代码模版库中的所有小程序代码模版
|
WxOpenFastMaService |
getWxFastMaServiceByAppid(String appid)
获取指定appid的快速创建的小程序服务
|
WxOpenMaService |
getWxMaServiceByAppid(String appid)
获取指定appid的开放平台小程序服务(继承一般小程序服务能力)
|
WxMpService |
getWxMpServiceByAppid(String appid) |
WxOpenConfigStorage |
getWxOpenConfigStorage() |
WxMaJscode2SessionResult |
miniappJscode2Session(String appId,
String jsCode) |
String |
oauth2buildAuthorizationUrl(String appid,
String redirectURI,
String scope,
String state) |
WxMpOAuth2AccessToken |
oauth2getAccessToken(String appid,
String code) |
WxMpOAuth2AccessToken |
oauth2refreshAccessToken(String appid,
String refreshToken) |
String |
route(WxOpenXmlMessage wxMessage) |
void |
setAuthorizerOption(String authorizerAppid,
String optionName,
String optionValue)
设置授权方的选项信息
|
static final String COMPONENT_MOBILE_LOGIN_PAGE_URL
static final String OAUTH2_ACCESS_TOKEN_URL
static final String OAUTH2_REFRESH_TOKEN_URL
static final String GET_TEMPLATE_DRAFT_LIST_URL
小程序代码模版库管理:https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1506504150_nMMh6&token=&lang=zh_CN access_token 为 component_access_token
WxMpService getWxMpServiceByAppid(String appid)
WxOpenMaService getWxMaServiceByAppid(String appid)
appid - WxOpenFastMaService getWxFastMaServiceByAppid(String appid)
appid - WxOpenConfigStorage getWxOpenConfigStorage()
String getComponentAccessToken(boolean forceRefresh) throws WxErrorException
WxErrorExceptionString getPreAuthUrl(String redirectURI) throws WxErrorException
WxErrorExceptionString getPreAuthUrl(String redirectURI, String authType, String bizAppid) throws WxErrorException
WxErrorExceptionString getMobilePreAuthUrl(String redirectURI) throws WxErrorException
redirectURI - WxErrorExceptionString getMobilePreAuthUrl(String redirectURI, String authType, String bizAppid) throws WxErrorException
redirectURI - authType - bizAppid - WxErrorExceptionString route(WxOpenXmlMessage wxMessage) throws WxErrorException
WxErrorExceptionWxOpenQueryAuthResult getQueryAuth(String authorizationCode) throws WxErrorException
WxErrorExceptionWxOpenAuthorizerInfoResult getAuthorizerInfo(String authorizerAppid) throws WxErrorException
WxErrorExceptionWxOpenAuthorizerOptionResult getAuthorizerOption(String authorizerAppid, String optionName) throws WxErrorException
WxErrorExceptionvoid setAuthorizerOption(String authorizerAppid, String optionName, String optionValue) throws WxErrorException
WxErrorExceptionString getAuthorizerAccessToken(String appid, boolean forceRefresh) throws WxErrorException
WxErrorExceptionWxMpOAuth2AccessToken oauth2getAccessToken(String appid, String code) throws WxErrorException
WxErrorExceptionboolean checkSignature(String appId, String timestamp, String nonce, String signature)
WxMpOAuth2AccessToken oauth2refreshAccessToken(String appid, String refreshToken) throws WxErrorException
WxErrorExceptionString oauth2buildAuthorizationUrl(String appid, String redirectURI, String scope, String state)
WxMaJscode2SessionResult miniappJscode2Session(String appId, String jsCode) throws WxErrorException
WxErrorExceptionList<WxOpenMaCodeTemplate> getTemplateDraftList() throws WxErrorException
WxErrorException - 获取失败时返回,具体错误码请看此接口的注释文档List<WxOpenMaCodeTemplate> getTemplateList() throws WxErrorException
WxErrorException - 获取失败时返回,具体错误码请看此接口的注释文档void addToTemplate(long draftId)
throws WxErrorException
draftId - 草稿ID,本字段可通过“获取草稿箱内的所有临时代码草稿”接口获得WxErrorException - 操作失败时抛出,具体错误码请看此接口的注释文档getTemplateDraftList()void deleteTemplate(long templateId)
throws WxErrorException
templateId - 要删除的模版IDWxErrorException - 操作失败时抛出,具体错误码请看此接口的注释文档getTemplateList()WxOpenCreateResult createOpenAccount(String appId) throws WxErrorException
appId - 公众号/小程序的appIdWxErrorExceptionWxOpenResult fastRegisterWeapp(String name, String code, String codeType, String legalPersonaWechat, String legalPersonaName, String componentPhone) throws WxErrorException
注意:创建任务逻辑串行,单次任务结束后才可以使用相同信息下发第二次任务,请注意规避任务阻塞
name - 企业名(需与工商部门登记信息一致)code - 企业代码codeType - 企业代码类型 1:统一社会信用代码(18位) 2:组织机构代码(9位xxxxxxxx-x) 3:营业执照注册号(15位)legalPersonaWechat - 法人微信号legalPersonaName - 法人姓名(绑定银行卡)componentPhone - 第三方联系电话(方便法人与第三方联系)WxErrorExceptionWxOpenResult fastRegisterWeappSearch(String name, String legalPersonaWechat, String legalPersonaName) throws WxErrorException
注意:该接口只提供当下任务结果查询,不建议过分依赖该接口查询所创建小程序。
小程序的成功状态可在第三方服务器中自行对账、查询。
不要频繁调用search接口,消息接收需通过服务器查看。调用search接口会消耗接口整体调用quato
name - 企业名(需与工商部门登记信息一致)legalPersonaWechat - 法人微信号legalPersonaName - 法人姓名(绑定银行卡)WxErrorExceptionCopyright © 2019. All rights reserved.