https://cloud.tencent.com/developer/article/1914364
url_msg = 'https://api.weixin.qq.com/cgi-bin/message/subscribe/send'
body = {
"touser": "oyLvs4hcubi5-FhfYVqH2VJGKIN4", # 也就是OPENID
"template_id": "Ou27mwu5QLHaL-sxYfka1eecqHhyuXxllHKVuZTUIN0",
"page": "pages/index/index",
"form_id": "FORMID", # 这个应该是来源场景值ID吧,我这里没有用到
"data": {
"date2": {
"value": "2020-03-19 14:35:30"
},
"thing3": {
"value": "firegod"
},
"thing7": {
"value": "服务器内存低于256MB"
}
}
}
value里,值里面不能用符号,怎么办?比如 "value": "服务器内存低于256MB",改为 "服务器内存低于256MB,硬盘512G",就不行,报:
{"errcode":47003,"errmsg":"argument invalid! data.thing1.value invalid rid: 664dbc35-4e92355b-4566d61e"}
怎么解决这个问题?谢谢
你好,日志664dbc35-4e92355b-4566d61e查看请求包 { "touser": "oRYzE67QeadCgTNdc5H0sv7Z2ivo", "template_id": "0QEL-Zn5krGt1k12JSq3M7UDURErK43-sObyoc8WJrc", "page": "pages/dist/jieMian/dist_144499/dist/index", "form_id": "FORMID", "data": { "thing3": { "value": "文件翻译功能升级" }, "thing1": { "value": "视频翻译功能支持从相册上传视频-支持苹果手机常用的音频m4a格式" } } }
thing1超过20个以内字符
改为英文逗号试试