Diving into the RingCentral SMS ‘From’ Phone Number

Samyukta Bharadwaj
RingCentral Developers
4 min readApr 14, 2020

The SMS API is one of our most utilized APIs. Using a 10 Digit Long Code (10 DLC) or a Toll Free “trusted” business number, the SMS API can be leveraged to send

  • Consumer (or Conversational texts)
  • Non-Consumer (or Business texts like 2-Factor-Auth, Meeting Reminders, Delivery Notifications,Surveys)

Even though it’s relatively easy and straightforward to use, the SMS API does become susceptible to a few mistakes here and there.

While sending the SMS via API, you may find yourself running into an error that doesn’t let you send the SMS. The error you come across, may look something like this :

Image 1

If this is the error you’re seeing, it’s because the ‘From’ number you are using to send the SMS, is not enabled for your extension.

We have had some cases where users end up getting this error, mainly because the ‘From’ number is

  • a phone number, that, although is a part of the RingCentral account the user belongs to, but is not a part of the user’s extension, by user, I mean the logged in extension.
  • a company number (including the main company number), and the logged in user’s extension is not an operator extension.

There are higher chances of encountering the error mentioned above, in production than sandbox, since the latter has only four allowed phone lines / extensions provided.

Operator Ext in Single site environment (single level)

In the above image, the operator ext is the extension number 101, and when logged in as 101, it is possible to send an SMS using a Company Number, it is not possible to send an SMS with a Company Number being logged in as another user, say 104.

This however, looks different in a multisite environment

Operator Ext in multisite environment (single level)

Operator extension in a multisite environment is also known as SMS recipient. Here, extension 22896 can send sms with the from number as a company number, no other extension can do so, unless they are made the Site Fax / SMS Recipient (operator extension) as shown in the above example.

There are higher chances of encountering the error from image 1 in production than sandbox, since the latter has only four allowed phone lines / extensions provided.

If you have gone through our SMS quick start guides, you will notice that the From number, says RINGCENTRAL_USERNAME which is same as the Main Company number.

SMS quick start guide code snippet

Please note that using the quick start guide is not wrong and the quick start guides are extremely helpful in getting started, but remember because they are quick start guides and not elaborate guides, they will not cover all the scenarios.If it is a local number it should be enabled for SMS. If it is Toll Free — by default it is not enabled (but toll free numbers can be assigned to a user, however, neither will they be enabled for SMS). In most cases the problem is because user is not a company operator who is eligible to send SMS from company numbers.

The above code snippet works perfectly fine if the main company number is enabled and the extension is a designated company operator (or the operator extension). That being said, the main company number in production can be enabled for the Toll-Free messaging feature.

But what’s the next step if the Main company number is not enabled for sending SMS? You can add a digital line or a direct number in the extension from which you are sending the SMS. If you’re not sure how to do for more details on how to do this, you can checkout the support article here.

You may still run into this error if you are using a phone number that is assigned to another extension or the number may not even be a RingCentral number. To best avoid such a scenario, we suggest using this endpoint :

/restapi/v1.0/account/{accountId}/extension/{extensionId}/phone-number

to retrieve a list of valid phone numbers that you can use to send SMS from. The response must have “SmsSender” value in the features parameter as shown below.

JSON response for Get Extension Phone Number List

Note : As mentioned earlier the Main company number for production can be enabled for Toll Free Messaging. This is available on request. Please reach out to our Customer Care if you are interested in the Toll Free Messaging feature. We have a detailed article with more information on this here.

To learn even more about other features we have make sure to visit our developer site and if you’re ever stuck make sure to go to our developer forum.

Want to stay up to date and in the know about new APIs and features? Join our Game Changer Program and earn great rewards for building your skills and learning more about RingCentral!

References

--

--