question

nibu-eapen10876 avatar image
nibu-eapen10876 asked Phong Vu answered

How do I send an SMS on behalf of another extension/phone number?

I am getting the following error when trying to send an SMS from a phone number assigned to a different user in my account. The error message makes mention of the "OutboundSMS" permission, but I do not see that permission in my account. Here is the error I am getting from the API:

 {
     "errorCode": "FeatureNotAvailable",
     "message": "In order to call this API endpoint for another extension, one
            of the following permissions [OutboundSMS] have to be granted 
            extended scope to the authorised user.",
     "errors": [
           {
              "errorCode": "CMN-419",
              "message": "In order to call this API endpoint for another extension,
                             one of the following permissions [OutboundSMS] have 
                             to be granted extended scope to the authorised user.",
              "permissionsName": "OutboundSMS"
           }
     ],
     "permissionsName": "OutboundSMS"
 }
rest apiextension
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

You are right. The error is indeed misleading because as you pointed out, that permission does exist in a way that you can assign to an extension or an app.

RingCentral only permits users to send SMS from phone numbers that are directly assigned to them. So there is no way currently that a user or admin can arbitrarily send an SMS on behalf of any other user.

But there are workarounds to this limitation. They key ultimately rests in being able to authenticate to the platform using the credentials of a person who is assigned a phone number you want to send SMS from. To do this, identify the phone number you want to send SMS from, and see who that phone number is assigned to. Let's say this person is named Andre.

As a Developer Admin, one can log into the Developer Console and generate a JWT credential on behalf of another user in the account. So ask Andre to login to the Developer Console so that they has an account there. Then have them generate a JWT credential, or have the Developer Admin generate one on their behalf.

Finally, use that JWT credential to authenticate to the API. Within the context of that session, an application can then send an SMS on behalf of the phone number assigned to Andre.

There is one small exception to this rule, and it relates to sending SMS from the Main Company Number. If this is your use case, then the person in the org assigned the role of "Auto Receptionist" can send SMS from the Main Company Number, in addition to the person to whom the Main Company Number may be assigned.

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