question

Developer Access avatar image
Developer Access asked Developer Access commented

How to send SMS via RingCentral API to other extensions

We need to develop an application that should send SMS to several users in our company via RingCentral API.

We registered new App in "RingCentral Developers" console and granted "SMS" in "App Permission" section of App in "RingCentral Developers" console.


Our application connects to RingCentral API using Password-based auth flow

(with Extension shown in "Credentials" section of App in "RingCentral Developers" console).


But when the app tries to send SMS to a number belongs to another extension, it receives following error:

"In order to call this API endpoint for another extension, one of the following permissions [OutboundSMS] have to be granted with extended scope to the authorized user."


We investigated "RingCentral Community" in order to understand what is the cause of this error or how to avoid it.

All topics we found contain answers like following:

"You can only send SMS from phone numbers belong to the extension you currently log in".


Please clarify - how can we log in under some other extension than shown in "Credentials" section of the App?

Maybe we should register several developer accounts with different extensions?

If so, how we can specify extension of other user when we create developer account?


Or, there is some possibility to grant [OutboundSMS] permission to developer account? If so, how can we do it?




rest apiextensionsending sms
1 |3000

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

1 Answer

Phong Vu avatar image
Phong Vu answered Developer Access commented

Let's say you have an extension 103, which has a direct number +1 (408) 123-4567.

If you authenticate the app with the extension 103 username and password, you can send text message from the number +1 (408) 123-4567 to any other phone numbers.

To make sure that you send from a number that owned by the authenticated extension, you can call this endpoint to check its own numbers and also check if the number has the SMS feature.

The error you got is caused be sending from a number that belongs to another extension. And the error is misleading as it is not supported at all.

7 comments
1 |3000

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

Developer Access avatar image Developer Access commented ·

We use phone number and extension from "Credentials" section of App in "RingCentral Developers" console.


Yes, endpoint you provided returns a list containing this number

(we called the "phone-number" method for "~" accountId and "~" extension).


But the "features" array in this number's record contains "CallerId" value only.

Please advice how to grant "SmsSender" feature to the number?


(if it is important, the "usageType" value is "MainCompanyNumber")


0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ Developer Access commented ·

So that is the main company number and it does not belong to the user you authenticated the app.

To send message from the main company number, you have to authenticate the app with the main super admin, normally the extension 101 if the admin does not change its extension number.

0 Likes 0 ·
Developer Access avatar image Developer Access Phong Vu ♦♦ commented ·

If I change extension to "101" (instead of shown in "Credentials" section of console) then I get following error during authorization:

"Invalid resource owner credentials"


Where to see extension of main super admin?


0 Likes 0 ·
Show more comments

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys