Meta Whatsapp messages API can't send template with image header
I'm trying to send message templates through meta's Whatsapp messges API. I can successfully send templates with text variables but not with media elements such as a header image. When I try send the request I get the expected response with a wamid for the sent message but I never get a status update on this message or any info of why it didn't arrive (the message never makes it to the other end).
For normal text messages and other non-media templates I do get status updates correctly on my webhook. I've been readying their documentation and it's all over the place, i've been trying everything.
This is an example of the body from my request (everything else is correct [auth token etc..]).
body: {
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "PHONE_NUMBER",
"type": "template",
"template": {
"name": "request_permission",
"language": {
"code": "LANGUAGE_CODE"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"link": "https://www.gstatic.com/webp/gallery3/1.sm.png"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "TEXT_STRING"
},
{
"type": "text",
"text": "TEXT_STRING"
}
]
},
{
"type": "button",
"sub_type": "quick_reply",
"index": "0",
"parameters": [
{
"type": "payload",
"payload": "PAYLOAD"
}
]
},
{
"type": "button",
"sub_type": "quick_reply",
"index": "1",
"parameters": [
{
"type": "payload",
"payload": "PAYLOAD"
}
]
}
]
}
}
Meta docs: https://developers.facebook.com/docs/whatsapp/cloud-api/reference/messages#template-messages
I tried with different URLs for the image file, different formats and sources, on their own docs they have internet urls (without token protection) and it's supposed to work. I still got the same issue.
Edit:
Apparently, issues with message templates have been reported since 2 weeks ago and although the bug has been identified and assigned it hasn't been resolved. Users have been having issues with delays and failed message delivery with custom templates.
Bug URL: https://developers.facebook.com/support/bugs/587271766844244/
0 comments:
Post a Comment
Thanks