3

我正在使用这个

var image = {"type":"image","originalUrl":"image url here","previewUrl":"thumbnail url here"};
    context.sendResponse(JSON.stringify(image));

将图像上传到 gupshup whatsapp 聊天机器人的格式,但图像未发送,它显示的错误是

{
  "meta": {
    "api_status": "stable",
    "version": "2.21.4"
  },
  "errors": [
    {
      "code": 1014,
      "title": "Internal error",
      "details": "Image file format (application/octet-stream) is not supported"
    }
  ]
}
4

1 回答 1

0

application/octet-streamWhatsApp不支持将图像文件作为 Content-Type 发送,因此出现错误。

支持的内容类型是image/jpeg, image/png。因此,您必须提供以图片扩展名结尾的图片 URL.jpg/.jpeg/.png

于 2020-01-16T07:47:50.643 回答