Solved

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

  • 6 September 2018
  • 1 reply
  • 1489 views

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" }
icon

Best answer by Phong1426275020 6 September 2018, 19:55

View original

1 reply

Userlevel 1
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][1], 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][2]. 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]: https://developers.ringcentral.com/guide/getting-started/create-credential [2]: https://community.ringcentral.com/questions/108940/how-do-i-send-an-sms-from-the-main-company-number.html

Reply