I am trying to send a WhatsApp template message using Whatsapp Cloud API.
I am getting an error:
Unexpected key "0" on param "template". [type]
This is the Request that I am sending via Curl Post:
"messaging_product"=> "whatsapp",
"recipient_type" => "individual",
"to" => "$to_number",
"type" => "template",
'template' => array("name"=> "templateName",'language'=>array("code"=>"en"),
'components'=>
array(
array(
"type" => "header",
"parameters" => array(
array(
"type" => "image",
"image" => array(
"link" => $imageLink
)
)
)
)
),
array(
array(
"type" => "body",
"parameters" => array(
array("type"=> "text","text"=> $Productid),
)
)
)
)