wechat icon indicating copy to clipboard operation
wechat copied to clipboard

sendtemplate api https 无法发送 报43003错误

Open wxm007 opened this issue 5 years ago • 0 comments

public Long sendTemplate(String accessToken, String openId, String templateId, String link, List<TemplateField> fields) { Preconditions.checkNotNullAndEmpty(accessToken, "accessToken"); Preconditions.checkNotNullAndEmpty(openId, "openId"); Preconditions.checkNotNullAndEmpty(templateId, "templateId"); String url = "http://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + accessToken; Map<String, Object> params = this.buildTemplateParams(openId, templateId, link, fields); Map<String, Object> resp = this.doPost(url, params); Object msgId = resp.get("msgid"); return Long.valueOf(msgId instanceof Long?((Long)msgId).longValue():((Integer)msgId).longValue()); } url 里的 http https 是否可配置

wxm007 avatar Aug 10 '20 02:08 wxm007