发送小程序订阅信息总是47001?
发布于 5 年前 作者 tao31 9654 次浏览 来自 官方Issues

返回结果: body:

   { errcode: 47001,

     errmsg: 'data format error rid: 6062ce96-6f238b1e-0f3e6f25' }

代码:

-->url = https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=*******

post使用的 是 npm install --save [@types](/user/types)/needle

common._needlePOST(url, {

'touser': 'o6L******er0cY',

'template_id': 'logSx0Jr*************i2CJu2SHg-0Zg',

'page': 'index',

'miniprogram_state': 'developer',

'lang': 'zh_CN',

'data': {

'thing1': { 'value': '玻璃' },

'thing2': { 'value': '张三' },

'time5': { 'value': '15:01' },

'phrase4': { 'value': '般' },

'phrase3': { 'value': '隐患' }

}

}

, {

headers: {

// 'Content-Type': 'text/html; charset=utf-8',

'Content-Type': 'application/json; charset=utf-8',

// 'Content-Length': Buffer.byteLength(JSON.stringify(params))

'Accept-Charset': 'UTF-8',

"Data-type": "json"

}

})


回到顶部