question

Luke Clement avatar image
Luke Clement asked ·

How to setup users to send SMS from Toll Free Number

Problem: I am logging in as my user account in production through the api and can not send an SMS from our toll free number. Which account do I need to be logged in as? Our toll free number is assigned to an IVR. We are using a multi-level IVR. I'm guessing I have to log in as the main company number, but will that work since our toll free number isn't the main company number?


I'm not super familiar with the user management system in RingCentral which may be why I'm getting turned around here. In the sandbox I'm not able to mimic our prod setup exactly because I can't add a toll free number in the sandbox but that is the number we will be sending from in prod.

apismsfrequently asked
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered ·

Hi Luke,

As your SMS toll free numbers belong to the account level, you need to login with an admin user (normally the 101 or main company number). Once you log in, you can read the the phone numbers and detect if a number is an SMS TollFree number or not. Here is the code snippet in Node JS

var SDK = require('ringcentral')

var rcsdk = new RC( {server: "server_url", appKey: "client_id", appSecret: "client_secret"} );
var platform = rcsdk.platform();

platform.login( {username: "username", password: "password", extension: "extension_number"} )
    .then(function(resp) {
        read_sms_tollfree_number()
    });

function read_sms_tollfree_number(){
    platform.get('/account/~/extension/~/phone-number')
      .then(function(response) {
          var jsonObj =response.json();
          for (var record of jsonObj.records
              if (record.paymentType == "TollFree") {
                  if (record.type == "VoiceFax"){
                      for (var feature of record.features){
                          if (feature == "TollFreeSmsSender"){
                              console.log("TollFree number: " + record.phoneNumber)
                          }
                      }
                  }
              }
          }
        })
        .catch(function(e)
            console.error(e.message);
        });
}
2 comments Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

When you say "Admin" is there only one admin per account? I have the "Super Admin" role and am logged in on the main company number as an extension other than 101.

0 Likes 0 · ·

No, as a super admin, you can login the service web, select a user and grant that user with an admin role. That user can then access the platform at account level.

0 Likes 0 · ·
Luke Clement avatar image
Luke Clement answered ·

In order to run this script I will need to duplicate my app to add the ReadAccounts permission, wait 3 days until I meet the graduation requirements to get prod credentials, then run the script hopefully without needing other permissions?

1 comment Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

So the app you want to have this feature is already published? If that is the case,


1/ You can clone that app, add the feature, test then apply for graduation.

2/ You are a customer? Send a request to devsupport@ringcentral.com with your app name, account id or company number and ask for expedited help. They can help you add the permission to your published app.

0 Likes 0 · ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.