by adding the brackets within the to fixes error of the to not being in a array
$req = array(
'from' => '+'.$from,
'to' => ['+'.$to],
'media' => $this->media_urls($id)
public function sendMessage($id, $to, $from, $message=null)
{
$req = array(
'from' => '+'.$from,
'to' => ['+'.$to],
'body' => $message
I have tested this error is now gone and message sends. Error thrown before change was sms connector Server Error: Unable to send message: HTTP 422, {"status":"error","error":"to must be an array"}
by adding the brackets within the to fixes error of the to not being in a array $req = array( 'from' => '+'.$from, 'to' => ['+'.$to], 'media' => $this->media_urls($id)
I have tested this error is now gone and message sends. Error thrown before change was sms connector Server Error: Unable to send message: HTTP 422, {"status":"error","error":"to must be an array"}