收藏
回答

小程序模板请求返回47003,入参都有麻烦看看什么原因?

我传入参数都有

{"thing1":"你预约的就诊医生停诊,请你及时办理退号,逾期作废。","thing10":"2023年12月08日 17:00-17:30","thing12":"疼痛科普通号","thing17":"lihua","thing3":"TTK1-疼痛科1"}

返回信息如下,麻烦大佬们给看看啥情况

{"errcode":47003,"errmsg":"argument invalid! data.thing17.value is empty rid: 6577cdc8-2b4bc659-0aec7812"}

回答关注问题邀请回答
收藏

2 个回答

  • Peter
    Peter
    2023-12-29

    接口提交的数据

    {

        "touser": "oPFmV6_dv4nMLSlsf4svH33xxNms",

        "template_id": "N5C4BG0RNRdoRIHJjC-D63qVpqKiy-r3bphCkAaQXWY",

        "page": "index",

        "data": {

            "time1.DATA": {

                "value": "9"

            },

            "phrase2.DATA": {

                "value": "888"

            },

            "amount3.DATA": {

                "value": "888"

            },

            "thing4.DATA": {

                "value": "8888"

            }

        }

    }



    官方返回的

    "request": {

            "invoke_time": 1703855159,

            "cost_in_ms": 88,

            "request_url": "access_token=76_TLI4avvj0Xf7uYkookGwF2n1v-5FEZnFse6G4hZk2MQv-MMcJTmJC3xMhTtygcR5JsIvWEJIAQlXdy9ahW1LQGS_uZFD9gupCuxBiPLJdHZf_oCS1SJzJv9NOGwYDXgACABGA",

            "request_body": "{\"touser\":\"oPFmV6_dv4nMLSlsf4svH33xxNms\",\"template_id\":\"N5C4BG0RNRdoRIHJjC-D63qVpqKiy-r3bphCkAaQXWY\",\"page\":\"index\",\"data\":{\"time1.DATA\":{\"value\":\"9\"},\"phrase2.DATA\":{\"value\":\"888\"},\"amount3.DATA\":{\"value\":\"888\"},\"thing4.DATA\":{\"value\":\"8888\"}}}",

            "response_body": "{\"errcode\":47003,\"errmsg\":\"argument invalid! data.time1.value is empty rid: 658ec437-375fb59e-742ed73f\"}",

       

        }

    }

    接口返回的

    {"errcode":47003,"errmsg":"argument invalid! data.time1.value is empty rid: 658ec4b2-71d7658c-0500c1b1"}调试了好久,也没有发现问题
    
    2023-12-29
    有用
    回复
  • Hlxuan.
    Hlxuan.
    2023-12-12

    参考文档示例修改一下请求参数:https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/mp-message-management/subscribe-message/sendMessage.html#%E8%AF%B7%E6%B1%82%E6%95%B0%E6%8D%AE%E7%A4%BA%E4%BE%8B

    2023-12-12
    有用
    回复 3
    • K
      K
      2023-12-12
      感谢,我试试哈
      2023-12-12
      回复
    • K
      K
      2023-12-12
      我按照demo把传参格式改了还是不行
      2023-12-12
      回复
    • Hlxuan.
      Hlxuan.
      2023-12-12回复K
      报错是thing17参数值为空,你可以调用这个接口查询rid信息,能看到请求参数(request_body):https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/openApi-mgnt/getRidInfo.html
      2023-12-12
      回复
登录 后发表内容