使用接口:
https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=ACCESS_TOKEN
类目模版说明也是用同一接口调用:
入参:
{"touser":"oAdlHt0iEUOtdl4MSSKE3VVs4GsA","data":{"thing2.DATA":{"value":"中山市XX医院"},"thing1.DATA":{"value":"儿科大楼二楼普通门诊"},"phrase1.DATA":{"value":"李某某"},"phrase2.DATA":{"value":"张医生"},"time1.DATA":{"value":"2023-08-09 08:00~08:30"}},"template_id":"3ZaS7yuU4ieYQw8rgJBEe-KAy_oi9Nd4Yo9KOX9LX58","url":"https://wx.zsboai.com"}
结果:
{"errcode":47003,"errmsg":"argument invalid! data.phrase1.value is empty rid: 64d328ea-4a68e3dd-70f17071"}
请问哪里不对,应该怎么处理?
格式不对,没有DATA。
{ "touser":"oAdlHt0iEUOtdl4MSSKE3VVs4GsA", "data":{ "thing2":{ "value":"张医生" }, "thing1":{ "value":"李鹏真" }, "time1":{ "value":"2023-08-09 08:00~08:30" }, "thing3":{ "value":"儿科大楼二楼普通门诊" }, "thing4":{ "value":"中山市博爱医院" } }, "template_id":"3ZaS7yuU4ieYQw8rgJBEe-KAy_oi9Nd4Yo9KOX9LX58", "url":"https://www.baidu.com" }