We have created a WhatsApp template and in that template, when a user registers on our platform, we will send him an SMS. The onboarding SMS template will have a video in the headerand below that, there will be content in the body.
To send video file, we have used video upload API and we get an upload ID from there.
When we are trying to hit the API from postman we are getting the following error.
{"error": {
"message": "(#100) Unexpected key "format" on param "template['components'][0]".",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "A-mwg-aEQpPILr2lqp14xbk"
}}
Below is the request body which we are sending in the POST API:
{
"messaging_product": "whatsapp",
"to": "91XXXXXXXX",
"type": "template",
"template": {
"name": "user_onboarding",
"language": {
"code": "en"
},
"components": [
{
"type": "header",
"format": "VIDEO",
"example": {
"header_handle": [
"4:eW9sb2hlYWx0aA==:dmlkZW8vbXA0:ARaoH5bTOjkT5kECygOVWZZYZKHfmSQJ3mnPyU7ZcMVa-7igCYeEcV2G-OurPYfHlxUlU2sWQwMO1wJDCBdTh2YnC4Jc1hgRU7-d4PoYJmJZrg:e:1723915181:528600102618885:100092379197505:ARYmumWHM2WJ0KJHFC4"
]
}
},
{
"type": "BODY",
"parameters": [
{
"type": "text",
"text": "Saif Khan"
},
{
"type": "text",
"text": "YoloHealth"
}
]
}
]
}
}
API URL: https://graph.facebook.com/v20.0/124449227309891/messages
Any help would be appreciated.