I want to send the parameters in in whatsapp cloud api. How can I achieve that.
$messageData = array(
'messaging_product' => "whatsapp",
'to' => "123456789",
'type' => "template",
'template' => array("name"=> "hello_world",'language'=>array("code"=>"en_Us")),
);
{
type: 'template',
messaging_product: 'whatsapp',
to: e.recipient_number,
template: {
name: WHATSAPP_TEMPLATE_NAME,
language: { code: LANGUAGE_CODE },
components: [
{
type: 'body',
parameters: [
{ type: 'text', text: e.customer_name },
{ type: 'text', text: e.item_name },
{ type: 'text', text: e.delivery_date },
],
},
],
},
}
{"error":{"message":"(#132000) Number of parameters does not match the expected number of params","type":"OAuthException","code":132000,"error_data":{"messaging_product":"whatsapp","details":"body: number of localizable_params (0) does not match the expected number of params (3)"},"error_subcode":2494073,"fbtrace_id":"Abab9mTp_dJ9Ryd4ytHPl7Y"}}
