News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
How to send fax from different fax number to ringcentral number(account).
Tags: fax
May 8, 2023 at 3:42am   •   1 replies  •  0 likes
tech demo

Want to send a fax from a different fax number to my ring central number or account(admin portal) using RingCentral sdk (fax API)


The code I am using is:-


require('vendor/autoload.php');

$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../');

$dotenv->load();


$RECIPIENT = $_ENV['FAX_RECIPIENT'];


$rcsdk = new RingCentral\SDK\SDK( $_ENV['RC_CLIENT_ID'],

$_ENV['RC_CLIENT_SECRET'],

$_ENV['RC_SERVER_URL'] );

$platform = $rcsdk->platform();

$platform->login( [ "jwt" => $_ENV['RC_JWT'] ] );


$request = $rcsdk->createMultipartBuilder()

->setBody(array(

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

'faxResolution' => 'High',

))

->add(fopen('test.jpg', 'r'))

->request('/account/~/extension/~/fax');


$resp = $platform->sendRequest($request);

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

1 Answer
answered on May 8, 2023 at 8:31am  

To send a fax message using the Fax API, you cannot set the "from" phone number. The server will choose the preselected fax number from your extension outbound Fax settings in your [user extension service portal](https://service.ringcentral.com). If you want to change the default Outbound Fax settings (send from a company Fax number) for your extension, login the admin portal and change the Fax number to your own number.

screen-shot-2023-05-08-at-83121-am.png


 0



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

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us