微信小程序发送模板消息出现40013

小程序 文章 2022-03-16 20:00 3391 0 全屏看文

AI助手支持GPT4.0

微信小程序发送模板消息出现4001340013 appears when the WeChat applet sends a template message

微信小程序发送模板消息出现40013
框架类型 问题类型 终端类型 微信版本 基础库版本
小程序 Bug 工具 工具调用 工具调用

使用postman调用小程序发送模板信息时候出现{"errcode":40013,"errmsg":"invalid appid rid: 60f15239-26b18167-4d754bc5"}

经过检查发现appId是正确的没有问题,微信小程序的主体和公众号也是一样的,小程序也和公众号进行关联了

    "touser": "o7kZq5iDL5KcrxHYxLEf7Oti4xME",    "mp_template_msg": {        "data": {            "keyword3": {                "value": "0"            },            "keyword1": {                "value": "21312124"            },            "keyword2": {                "value": "2022-03-16 11:25:00"            },            "remark": {                "value": "您有一通未处理的来电信息"            },            "first": {                "value": "来电提醒"            }        },        "appid": "wxd9ec1d0b10115764",        "template_id": "FAapsTlh0RpkVot_X23Rqwtn7tiy4rZ6F3BgpQ3wh3M",        "miniprogram": {            "appid": "wx60426e28089af4fb",            "pagepath": "pages/bindDevice/index?callId=21312&type=share"        },        "url": "http://weixin.qq.com/download"    }}

Frame type problem type terminal type WeChat version basic library version small program Bug tool utility calling tool call postman use applet to send template information when {errCode ": 40013," errmsg ":" invalid appid rid: 60f15239-26b18167-4d754bc5 "}, after checking, appId is found to be correct, no problem, WeChat small program main body and official account number is same. The small program is also associated with the official account: "touser": "o7kZq5iDL5KcrxHYxLEf7Oti4xME", "mp_template_msg": {"data": {"keyword3": {"value": "0"}, "keyword1": {"value": "21312124"}, "Keyword2": {"value": "2022-03-16 11:25:00"}, "remark": {"value": "you have an unprocessed incoming call message"}, "first": {"value": "incoming call reminder"}},         "appid": "wxd9ec1d0b10115764",        "template_id": "FAapsTlh0RpkVot_X23Rqwtn7tiy4rZ6F3BgpQ3wh3M",        "miniprogram": {            "appid": "wx60426e28089af4fb",            "pagepath": "pages/bindDevice/index?callId=21312&type=share"        },        "url": " http://weixin.qq.com/download "    }}

回答:

Mr.Zhao:

你最起码亮个截图吧,你找不出来哪里不对,可以让别人找

CC:
在代码中使用RestTemplate可以正常访问,使用postman就不可以


老张:

1、公众号是否关联了小程序?

CC:确定已经关联
C:

检查appid

CC:appId就是小程序的appId,检查无误

-EOF-

AI助手支持GPT4.0