Skip to content

Face issue while sending the mms with image. #95

Open
@navichawla92

Description

@navichawla92

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions