public class WechatMpClient extends Object implements WechatMpApi
cgi_bin_ticket_getticket, cgibin_add_template, cgibin_send_data, cgibin_set_industry, cgibin_token, oauth2_access_token, oauth2_refresh_token, sns_auth_token, sns_userinfo| 构造器和说明 |
|---|
WechatMpClient() |
public static MpOauthTokenResponse obtainOauthAccessToken(Map<String,Object> mapToken) throws Exception
mapToken - the map tokenException - the exceptionpublic static MpOauthTokenResponse obtainOauthAccessToken(MpObtainOauthTokenRequest request) throws Exception
request - the requestException - the exceptionpublic static MpOauthTokenResponse refreshOauthAccessToken(Map<String,Object> mapToken) throws Exception
mapToken - the map tokenException - the exceptionpublic static MpOauthTokenResponse refreshOauthAccessToken(MpRefreshOauthTokenRequest request) throws Exception
request - the requestException - the exceptionpublic static String generateWechatUrl(String appId, String scope, String callback, String bizData) throws Exception
appId - the app idscope - the scopecallback - the callbackbizData - the biz dataException - the exceptionpublic static MpUserInfoResponse obtainUserInfo(Map<String,Object> userInfoMap) throws Exception
userInfoMap - the user info mapException - the exceptionpublic static MpUserInfoResponse obtainUserInfo(MpUserInfoRequest request) throws Exception
request - the requestException - the exceptionpublic static boolean isvalidOauthAccessToken(Map<String,Object> mapToken) throws Exception
mapToken - the map tokenException - the exceptionpublic static boolean isvalidOauthAccessToken(MpValidOauthTokenRequest request) throws Exception
request - the requestException - the exceptionpublic static MpTokenResponse obtainAccessToken(String appid, String secret) throws Exception
appid - the appidsecret - the secretException - the exceptionpublic static MpJsApiTicketResponse obtainJsApiTicket(String token) throws Exception
token - 普通tokenException - the exceptionpublic static MpJsApiTicketResponse obtainJsApiTicket(String appid, String secret) throws Exception
appid - the appidsecret - the secretException - the exceptionpublic static MpTemplateResponse obtainTemplateId(String access_token, String template_id_short) throws Exception
access_token - the access tokentemplate_id_short - the template id shortException - the exceptionpublic static MpIndustryResponse setupIndustry(String access_token, String industry_id1, String industry_id2) throws Exception
access_token - the access tokenindustry_id1 - the industry id 1industry_id2 - the industry id 2Exception - the exceptionpublic static MpSendDataResponse sendMsgToUser(String access_token, String data) throws Exception
access_token - the access tokendata - json格式数据,是 MpSendDataRequest JOSNException - the exceptionCopyright © 2018. All rights reserved.