I have sent the SMS via laravel. In twilio delivery status not showing for that SMS. If I try to sent via Javascript it shows delivery status.
$client->account->sms_messages->create($from, $sms_to, "Test SMS" , array());
Twilio developer evangelist here.
You are using the deprecated SMS/Messages
endpoint with that call. The deprecated endpoint does not include delivery statuses.
Instead, you should call:
$client->account->messages->create($from, $sms_to, "Test SMS" , array());
Note that is messages
not sms_messages
.
Let me know if that helps at all.
You need to assign the result to a variable, then, see what the method returns in order to print something.
$message = $client->account->sms_messages->create('$from', $sms_to, "Test SMS" , array());
print_r($message);
If you need further info, check the documentation and select your version: https://twilio.github.io/twilio-php/
$from
are definitely going to break things. - ceejayoz