question

Tyler Ehrig avatar image
Tyler Ehrig asked Phong Vu answered

Unable to send SMS with certain users

Good morning, I am developing an application with ringcentral, it is already finished but in the tests we discovered that when we log in with certain users and send a SMS fails.

We send the message with the API:
/restapi/v1.0/account/accountId/extension/extensionId/sms

And the error shown in console is as follows: Phone Number Doesn't belong to extension

The way we send the message is like this:

const sendSMS = await this.platform.post(
"/restapi/v1.0/account/~/extension/~/sms",
{
"from": {
"phoneNumber": that.senderPhone
},
"to": [
{
"phoneNumber": that.Mobile
}
],
"text": that.smsText});

Where that.senderPhone is the phone of the user that is logged and to is the remitent

ringcentral app
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

Follow the example code in this quick start (in Node JS) to first read the user phone numbers, and detect if the number has the SmsSender feature before using that phone number to send SMS messages.

If the phone number has the SmsSender feature but sending message still fails. Post the error code here.

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