Help with ExternalResourceClient for use CURLOPT_POSTFIELDS & CURLOPT_USERPWD together.

Hello Folks

I am trying to use ExternalResourceClient Instead of PHP Curl.

But not able to get the results. I have gone through the below link and other questions on Sugarclub.

(+) Introducing ExternalResourceClient your friendly Transport Client - Dev Blog - DevClub - SugarClub (sugarcrm.com)

Below is the sample code. As per above link i can be able to use auth but can't send post data. 

Can you please show sample code for UserPwd and PostFields

.

$twiliowhatsapparray = array( "From" => "whatsapp:+123456789", "To" => "whatsapp:+123456799", "Body" => "Test");
            
$twilio_url = "https://api.twilio.com/Messages.json";

$twilio_req = curl_init();
curl_setopt($twilio_req, CURLOPT_URL, $twilio_url);
curl_setopt($twilio_req, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($twilio_req, CURLOPT_POSTFIELDS, $twiliowhatsapparray);
curl_setopt($twilio_req, CURLOPT_USERPWD, "SDFGHRTY:ERTYUI");
$whatsappresult = curl_exec($twilio_req);
curl_close($twilio_req);