{
"touser":"oglPo4pO2fFwhrtHEduT-K0VOIKE",
"template_id":"U60ycga3Ny73QSrrZsQQSiTSkc_GM_gM4IXTTbKkYQU",
"page":"pages/index/index",
"mp_template_msg":{
"appid":"wx91d45fecf5d636be ",
"template_id":"U60ycga3Ny73QSrrZsQQSiTSkc_GM_gM4IXTTbKkYQU",
"url":"http://weixin.qq.com/download",
"miniprogram":{
"appid":"wxc0f09b698b7bf889",
"pagepath":"pages/index/index"
},
"data":{
"thing3":{
"value":"恭喜你购买成功!",
"color":"#173177"
},
"thing1":{
"value":"巧克力",
"color":"#173177"
},
"thing6":{
"value":"39.8元",
"color":"#173177"
}
}
}
}
错误提示:
{
"errcode": 45109,
"errmsg": "This API has been unsupported. For more details, please view https://developers.weixin.qq.com/community/develop/doc/000ae8d6348af08e7030bc2546bc01?blockType=1 rid: 6523c640-7ab2f4bf-36171d78"
}
需要注册认证微信开放平台,绑定公众号和小程序,根据适配来进行下发统一消息
给出的文档:https://developers.weixin.qq.com/community/develop/doc/000ae8d6348af08e7030bc2546bc01?blockType=1%20rid%3A%206523c640-7ab2f4bf-36171d78
目前下发统一消息接口已经被收回了,参考下公告“小程序与公众号下发统一消息接口调整通知”:https://developers.weixin.qq.com/community/develop/doc/000ae8d6348af08e7030bc2546bc01
如果需要下发公众号模板消息,可使用「公众号模板消息接口(https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Template_Message_Interface.html)」,需要注意的是:需要使用公众号token调用,只能使用公众号openid下发。
可以参考这篇文章:https://developers.weixin.qq.com/community/develop/article/doc/000c2a2911cc889cdf5052f1e61013