MOON
Server: Apache
System: Linux e2e-78-16.ssdcloudindia.net 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User: imensosw (1005)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/imensosw/www/imenso.co/payment/sms/index1.php
<?php

require('vendor/autoload.php');


$RECIPIENT = '+12055305938';

$RINGCENTRAL_CLIENTID = 'aobzKv4CTT2r7qB54kWNGQ';
$RINGCENTRAL_CLIENTSECRET = 'lfEOWd8FRZ22SfvBWpvt0gQBc-CsT1TLCHGo659pVXtQ';
$RINGCENTRAL_SERVER = 'https://platform.devtest.ringcentral.com';


//https://platform.devtest.ringcentral.com

$RINGCENTRAL_USERNAME = '+12055305938';

$RINGCENTRAL_PASSWORD = 'admin@123';

$RINGCENTRAL_EXTENSION = '101';



$rcsdk = new RingCentral\SDK\SDK($RINGCENTRAL_CLIENTID, $RINGCENTRAL_CLIENTSECRET, $RINGCENTRAL_SERVER);



$platform = $rcsdk->platform();

$platform->login($RINGCENTRAL_USERNAME, $RINGCENTRAL_EXTENSION, $RINGCENTRAL_PASSWORD);

$date = date('Y-m-d H:i:s');


$resp = $platform->post('/restapi/v1.0/account/~/extension/~/sms',

    array(

       'from' => array ('phoneNumber' => $RINGCENTRAL_USERNAME),

       'to' => array(array('phoneNumber' => $RECIPIENT)),

       'text' => 'Test sms from PRC '.$date

     ));

print_r ("SMS sent. Message status: " . $resp->json()->messageStatus);