Solved

How to send SMS via RingCentral API to other extensions

  • 31 August 2022
  • 2 replies
  • 574 views

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?




icon

Best answer by Phong1426275020 31 August 2022, 12:27

View original

2 replies

Userlevel 1

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.

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")


Reply