I'm using PHP REST API to send SMS, but unable to send SMS. My request is successful and return SMS ID with all the details but the SMS status is 'SendingFailed', I don't know why?
There is nor error code returned in the response. Please help me to get the errors that why the SMS not sent.
My request code is as follows:
$url = "https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/sms"; $param=json_encode(array('to'=>array(array('phoneNumber'=>$to)),'from'=>array('phoneNumber'=>'+19164374306'),'text'=>$smsBody)); $response = http($url,'POST',$param,$auth_token);
The response I'm getting is :
Array( [uri] => https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/message-... [id] => 2788749004 [to] => Array (  => Array ( [phoneNumber] => tonumber ) ) [from] => Array ( [phoneNumber] => +19164374306 [location] => Sacramento, North, CA ) [type] => SMS [creationTime] => 2017-03-18T06:33:39.000Z [readStatus] => Read [priority] => Normal [attachments] => Array (  => Array ( [id] => 2788749004 [uri] => https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/message-... [type] => Text [contentType] => text/plain ) ) [direction] => Outbound [availability] => Alive [subject] => Test SMS using a RingCentral Developer account - this is test msg by vishal [messageStatus] => SendingFailed [smsSendingAttemptsCount] => 1 [conversationId] => 2.2628912365145E+18 [conversation] => Array ( [id] => 2262891236514496402 [uri] => https://platform.devtest.ringcentral.com/restapi/v1.0/conversation/2262891236514496402 ) [lastModifiedTime] => 2017-03-18T06:33:40.041Z )