Thanks for responding Phong. Just curious then in the scenario I described, would I then have to just cache the pdf file on the server in a file, then fopen that file and send the fax with the attached pdf file with the code you sent me. That's really the only way then?
Unfortunately, the fax API does not support base64 encoded (the sample code in the API reference is incorrect). This is the only way how you fax attachments.
... $request = $rcsdk->createMultipartBuilder() ->setBody(array( 'to' => array(array('phoneNumber' => $RECIPIENT)), 'faxResolution' => 'High', )) ->add(fopen('log.txt', 'r')) ->add(fopen('test.html', 'r')) ->add(fopen('test.jpg', 'r')) ->add(fopen('test.pdf', 'r')) ->request('/account/~/extension/~/fax'); $resp = $platform->sendRequest($request); print_r ("FAX sent. Message status: " . $resp->json()->messageStatus);
Thanks for responding @Phong Vu . Just curious then in the scenario I described, would I then have to just cache the pdf file on the server in a file, then fopen that file and send the fax with the attached pdf file with the code you sent me. That's really the only way then? Or is there any other way to do what Im trying to do.
A new Community is coming to RingCentral!
Posts are currently read-only as we transition into our new platform.We thank you for your patience
during this downtime.
Try Workflow Builder
Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!Try RingCentral Workflow Builder