{ "messaging_product": "whatsapp",
"to": "91********5",
"type": "template",
"template": {
"name": "demo_template",
"language": {
"code": "en_US"
}
}
}
这是作为 post 方法传递的。
demo_template
是我创建的现有模板。
出现这样的错误:
{
"error": {
"message": "(#132012) Parameter format does not match format in the created template",
"type": "OAuthException",
"code": 132012,
"error_data": {
"messaging_product": "whatsapp",
"details": "header: Format mismatch, expected IMAGE, received UNKNOWN"
},
"error_subcode": 2494073,
"fbtrace_id": "ARtWScjGa0rADjfHvbOH4bS"
}
}
对于图像,您必须首先将图像上传到媒体库中,然后您可以获得已上传媒体的 ID,然后您可以将该 ID 附加到您在标头中发送的消息模板(如果是图像)。检查此链接这里
或者您可以直接使用url链接来附加媒体。
{ "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://URL" } } ] },
{ “错误”: { "message": "(#132001) 翻译中不存在模板名称", “类型”:“OAuthException”, “代码”:132001, “错误数据”:{ “messaging_product”:“whatsapp”, "details": "模板名称 (button_message) 在 en_US 中不存在" }, "fbtrace_id": "AdvIOb-7c4hj8yFuvkAvWjW" } }