public class WxMpSubscribeMsgServiceImpl extends Object implements WxMpSubscribeMsgService
构造器和说明 |
---|
WxMpSubscribeMsgServiceImpl() |
限定符和类型 | 方法和说明 |
---|---|
String |
addTemplate(String id,
List<Integer> keywordIdList,
String sceneDesc)
组合模板并添加至账号下的个人模板库
详情请见: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html
接口url格式: POST https://api.weixin.qq.com/wxaapi/newtmpl/addtemplate?
|
boolean |
delTemplate(String templateId)
删除账号下的某个模板
详情请见: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html
接口url格式: POST https://api.weixin.qq.com/wxaapi/newtmpl/deltemplate?
|
List<CategoryData> |
getCategory()
获取公众号类目
https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html
GET https://api.weixin.qq.com/wxaapi/newtmpl/getcategory?
|
List<PubTemplateKeyword> |
getPubTemplateKeyWordsById(String id)
获取模板库某个模板标题下关键词库
详情请见: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html
接口url格式: GET https://api.weixin.qq.com/wxaapi/newtmpl/getpubtemplatekeywords?
|
PubTemplateTitleListResult |
getPubTemplateTitleList(String[] ids,
int start,
int limit)
获取账号所属类目下的公共模板标题
详情请见: 获取账号所属类目下的公共模板标题
接口url格式: https://api.weixin.qq.com/wxaapi/newtmpl/getpubtemplatetitles?
|
List<TemplateInfo> |
getTemplateList()
获取当前账号下的个人模板列表
详情请见: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html
接口url格式: GET https://api.weixin.qq.com/wxaapi/newtmpl/gettemplate?
|
String |
send(WxMpSubscribeMessage subscribeMessage)
发送订阅消息
https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html
|
boolean |
sendOnce(WxMpSubscribeMessage message)
发送一次性订阅消息
详情请见: https://mp.weixin.qq.com/wiki?
|
String |
subscribeMsgAuthorizationUrl(String redirectUri,
int scene,
String reserved)
构造用户订阅一条模板消息授权的url连接
详情请见: https://mp.weixin.qq.com/wiki?
|
public String subscribeMsgAuthorizationUrl(String redirectUri, int scene, String reserved)
WxMpSubscribeMsgService
构造用户订阅一条模板消息授权的url连接 详情请见: https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1500374289_66bvB
subscribeMsgAuthorizationUrl
在接口中 WxMpSubscribeMsgService
redirectUri
- 用户授权完成后的重定向链接,无需urlencode, 方法内会进行encodescene
- 重定向后会带上scene参数,开发者可以填0-10000的整形值,用来标识订阅场景值reserved
- 用于保持请求和回调的状态,授权请后原样带回给第三方 (最多128字节,要求做urlencode)public boolean sendOnce(WxMpSubscribeMessage message) throws WxErrorException
WxMpSubscribeMsgService
发送一次性订阅消息 详情请见: https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1500374289_66bvB
sendOnce
在接口中 WxMpSubscribeMsgService
message
- the messageWxErrorException
- the wx error exceptionpublic PubTemplateTitleListResult getPubTemplateTitleList(String[] ids, int start, int limit) throws WxErrorException
WxMpSubscribeMsgService
获取账号所属类目下的公共模板标题 详情请见: 获取账号所属类目下的公共模板标题 接口url格式: https://api.weixin.qq.com/wxaapi/newtmpl/getpubtemplatetitles?access_token=ACCESS_TOKEN
getPubTemplateTitleList
在接口中 WxMpSubscribeMsgService
ids
- 类目 id,多个用逗号隔开start
- 用于分页,表示从 start 开始。从 0 开始计数。limit
- 用于分页,表示拉取 limit 条记录。最大为 30。WxErrorException
- .public List<PubTemplateKeyword> getPubTemplateKeyWordsById(String id) throws WxErrorException
WxMpSubscribeMsgService
获取模板库某个模板标题下关键词库 详情请见: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html 接口url格式: GET https://api.weixin.qq.com/wxaapi/newtmpl/getpubtemplatekeywords?access_token=ACCESS_TOKEN
getPubTemplateKeyWordsById
在接口中 WxMpSubscribeMsgService
id
- 模板标题 id,可通过接口获取WxErrorException
- .public String addTemplate(String id, List<Integer> keywordIdList, String sceneDesc) throws WxErrorException
WxMpSubscribeMsgService
组合模板并添加至账号下的个人模板库 详情请见: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html 接口url格式: POST https://api.weixin.qq.com/wxaapi/newtmpl/addtemplate?access_token=ACCESS_TOKEN
addTemplate
在接口中 WxMpSubscribeMsgService
id
- 模板标题 id,可通过接口获取,也可登录小程序后台查看获取keywordIdList
- 模板关键词列表sceneDesc
- 服务场景描述,15个字以内WxErrorException
- .public List<TemplateInfo> getTemplateList() throws WxErrorException
WxMpSubscribeMsgService
获取当前账号下的个人模板列表 详情请见: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html 接口url格式: GET https://api.weixin.qq.com/wxaapi/newtmpl/gettemplate?access_token=ACCESS_TOKEN
getTemplateList
在接口中 WxMpSubscribeMsgService
WxErrorException
- .public boolean delTemplate(String templateId) throws WxErrorException
WxMpSubscribeMsgService
删除账号下的某个模板 详情请见: https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html 接口url格式: POST https://api.weixin.qq.com/wxaapi/newtmpl/deltemplate?access_token=ACCESS_TOKEN
delTemplate
在接口中 WxMpSubscribeMsgService
templateId
- 要删除的模板idWxErrorException
- .public List<CategoryData> getCategory() throws WxErrorException
WxMpSubscribeMsgService
获取公众号类目 https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html GET https://api.weixin.qq.com/wxaapi/newtmpl/getcategory?access_token=ACCESS_TOKEN
getCategory
在接口中 WxMpSubscribeMsgService
WxErrorException
- .public String send(WxMpSubscribeMessage subscribeMessage) throws WxErrorException
WxMpSubscribeMsgService
发送订阅消息 https://developers.weixin.qq.com/doc/offiaccount/Subscription_Messages/api.html
send
在接口中 WxMpSubscribeMsgService
subscribeMessage
- 订阅消息WxErrorException
- .Copyright © 2024. All rights reserved.