Call Forwarding Node.js Quick Start

Welcome to the RingCentral Platform. RingCentral is the leading unified communications platform. From one system developers can integrate with, or build products around all the ways people communicate today: SMS, voice, fax, chat and meetings.

In this Quick Start, we are going to define the forwarding rules for a RingCentral phone number, so that your personal mobile phone will also receive phone calls made to your RingCentral phone number. Let's get started.

Create an App

The first thing we need to do is create an app in the RingCentral Developer Portal. This can be done quickly by clicking the "Create Call Management App" button below. Just click the button, enter a name and description if you choose, and click the "Create" button. If you do not yet have a RingCentral account, you will be prompted to create one.

Create Call Management App

  1. Login or create an account if you have not done so already.
  2. Go to Console/Apps and click 'Create App' button.
  3. Give your app a name and description, then click Next.
  4. On the second page of the create app wizard enter the following:
    • Select 'Private' for Application Type.
    • Select 'Server-only (No UI)' for Platform Type.
  5. On the third page of the create app wizard, select the following permissions:
    • EditExtensions
    • ReadAccounts
  6. We are using Password Flow authentication, so leave "OAuth Redirect URI" blank.

When you are done, you will be taken to the app's dashboard. Make note of the Client ID and Client Secret. We will be using those momentarily.

Setup Call Forwarding

Install RingCentral Node JS SDK

$ curl -sS | php
$ php composer.phar require ringcentral/ringcentral-php

Create and Edit forwarding.php

Create a file called forwarding.php. Be sure to edit the variables in ALL CAPS with your app and user credentials. Be sure to also set your personal phone number.






$platform = $rcsdk->platform();

try {
    $resp = $platform->post('/account/~/extension/~/forwarding-number',
            'phoneNumber' => $PERSONAL_CELL_PHONE,
            'label'       => 'Personal Phone',
            'type'        => 'Mobile'
    echo "Call forwarding configured. Phone numbers:\n";
} catch (Exception $e) {
    echo "Something went wrong. Maybe you already configured\n";
    echo "call forwarding for your mobile phone number? Let's see:\n";
$resp = $platform->get('/account/~/extension/~/forwarding-number');
foreach ( $resp->json()->records as $key => $val ) {
    echo $val->{'label'} . ":  " . $val->{'phoneNumber'} . "\n";

Run Your Code

You are almost done. Now run your script.

$ php forwarding.php

Graduate Your App

Congratulations on creating your first RingCentral application. The last step is to graduate your application. We recommend going through this process for your first application so you can understand the steps to take in the future, but also to come to appreciate the care taken by RingCentral to ensure that only high-quality apps are allowed into our production environment.