调用订阅消息send接口为什么一直报40001错误?
调用subscribeMessage.send方法时一直报40001,但是明明代码就是按文档写的啊,而且postman测试这个接口也报40001错误
代码片段如下:
String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=ACCESS_TOKEN";
url.replace("ACCESS_TOKEN",access_token);
RestTemplate restTemplate = new RestTemplate();
Map<String,String> data = new HashMap<>();
data.put("touser",openid);
data.put("template_id",template_id);
data.put("page","index");
data.put("data","{"name1": {"value": "clare"},"date01": {"value": "2015年01月05日"},"thing4":{"value":"hello world"}}");
String forObject = restTemplate.postForObject(url,null,String.class,data);