ringcentral / ringcentral-php

RingCentral Connect Platform PHP SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Face issue while sending the mms with image.

navichawla92 opened this issue · comments

I am using the mms api to send the mms but it is not working as it give error of 400 of request not valid where as same code is working fine on local system but it is not working on the server.
$RECIPIENT = '##';
$fromNumber = '###';

    $body = array(
             'from' => array ('phoneNumber' => $fromNumber),
             'to' => array(
                      array('phoneNumber' => $RECIPIENT)
                    ),
            'text' => 'Test'
           );
    $request = $rcsdk->createMultipartBuilder()
        ->setBody( $body )
        ->add(fopen(__DIR__.'/811737079524-32x32.jpg', 'r'))
        ->request('/account/~/extension/~/sms');
      $r = $platform->sendRequest($request);

thanks