Successfully sent images (png,jpeg) and pdf file but when i try to send doc,docx,xlsx etc file then twilio giving error 12300
Twilio is unable to process the Content-Type of the provided URL. Please see Twilio’s documentation on accepted content types for more information on valid Content-Types.
I’m following this document of twilio: https://www.twilio.com/docs/whatsapp/api
$whats_app_twilio_arr = [
"mediaUrl" => [PORTAL_URL . "/" . $dir . "/" . $newname],
"from" => "whatsapp:" . WHATS_APP_NO
];
if ($msg) {
$whats_app_msg_twilio_arr = [
"from" => "whatsapp:" . WHATS_APP_NO,
"body" => $msg
];
}
} else {
$whats_app_twilio_arr = [
"from" => "whatsapp:" . WHATS_APP_NO,
"body" => $msg
];
}
if (!empty($whats_app_msg_twilio_arr)){
$message1 = $twilio->messages->create("whatsapp:" . $phone_no, $whats_app_msg_twilio_arr);
}
$message = $twilio->messages->create("whatsapp:" . $phone_no, $whats_app_twilio_arr);