access_token是从接口https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid...获取的
请求发送内容: ouDoK5So8HMj5X_5zmp986HI_DN8为小程序的openid,已经关注了该公众号。但是一直返回40003,大佬们看看这是哪里除了问题?
{
"touser": "ouDoK5So8HMj5X_5zmp986HI_DN8",
"template_id": "ALNC7FmG4_W2yKQUh-fw-gbC3vVMPF9eRKTCKdWL0DM",
"miniprogram": {
"appid": "wxa7ae071fb4c1dde4",
"pagepath": "pages/repairDetail/repairDetail?id=191"
},
"data": {
"first": {
"value": "有新的报修来啦!",
"color": "#173177"
},
"keyword1": {
"value": "业务部第一车间",
"color": "#173177"
},
"keyword2": {
"value": "亿双林低压发泡机",
"color": "#173177"
},
"keyword3": {
"value": "41",
"color": "#173177"
},
"keyword4": {
"value": "米饭",
"color": "#173177"
},
"remark": {
"value": "",
"color": "#173177"
}
}
}
请问解决了吗
错误提示很明显了 无效的openid
公众号的模板消息接口只能用公众号的openid,你用小程序的openid能不错才怪。
https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/mp-message-management/uniform-message/sendUniformMessage.html