2026最新 · 错误码排查

errcode 47001: data format error

人话解释:你 POST 给微信接口的请求体不是合法的 JSON 字符串,或者缺少了 Content-Type 头,或者字段类型不对。

常见触发原因(按排查概率排序)

  1. fetch / axios 发送数据时传了对象但没 JSON.stringify,或传了 form-urlencoded。
  2. 字段里出现了中文未正确 UTF-8 编码,或者把数字类型传成了字符串(如 page_id)。

可直接复制的修复代码

await fetch(apiUrl, {
  method: 'POST',
  headers: { 'Content-Type': 'application/json; charset=utf-8' },
  body: JSON.stringify(payload),
});
运行本地代码合规体检去 /bbs 社区提问