question

eric-tech15696 avatar image
eric-tech15696 asked Tyler Liu answered

Unable To Create SMS/MMS Message in Sandbox - errorCode:CMN-419

I'm unable to send SMS/MMS via the REST API at https://developers.ringcentral.com/api-reference#SMS-and-MMS-sendSMS in my sandbox environment.


I've configured my app, user & phone number successfully. I can successfully send messages with the account using https://glip-app.devtest.ringcentral.com/# and receive them both internally and externally.


I'm currently posting to: https://platform.devtest.ringcentral.com/restapi/v1.0/account/258362004/extension/677044005/sms and receiving the response below:

{
                 
  "errorCode": "FeatureNotAvailable",    "message": "In order to call this API endpoint for another extension, user needs to have [OutboundSMS] permission granted with extended scope",    "errors": [      {        "errorCode": "CMN-419",        "message": "In order to call this API endpoint for another extension, user needs to have [OutboundSMS] permission granted with extended scope",        "permissionsName": "OutboundSMS"      }    ],    "permissionsName": "OutboundSMS"  }

Here are the extension features from calling: https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/677044005/phone-number?usa...


{    "id":250259005    "phoneNumber":"+1xxxxxxxx05"    "paymentType":"Local"    "location":"Warrior, AL"    "type":"VoiceFax"    "usageType":"DirectNumber"    "status":"Normal"    "country":{...}    "features":[      0:"CallerId"      1:"SmsSender"      2:"MmsSender" ]}


I've reviewed other messages about this being an admin user trying to send on behalf of another user but this is not the case.



Any feedback would be appreciated.


Thanks,




rest apideveloper sandbox
1 |3000

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

eric-tech15696 avatar image
eric-tech15696 answered
Incidentally were running into the same errorCode (CMN-419) when attempting to send faxes via the REST API as well. In that case the message is that our user needs [OutboundFax] permissions.


As with the SMS error, we were been able to send a test fax successfully via the regular RingCentral website at service.devtest.ringcentral.
1 |3000

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

Embbnux Ji avatar image
Embbnux Ji answered
@Eric do you add any phone number into your extension(user). You can add phone number in here: service.  https://service.devtest.ringcentral.com
1 |3000

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

eric-tech15696 avatar image
eric-tech15696 answered
Hi, yes - I have added a user, a phone number and an extension there. That user can send SMS & Fax using the website but cannot send using the REST API.
1 |3000

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

Phong Vu avatar image
Phong Vu answered
Hi Eric,

Please check out my answer in this old thread.

https://devcommunity.ringcentral.com/ringcentraldev/topics/in-order-to-call-this-api-endpoint-for-another-extension-user-needs-to-have-outboundsms-permission-granted-with-extended-scope

Make sure that you login with the user's login credentials, whose phone number you will use as the "from" number.

Let me know if you still get the error.
1 |3000

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

eric-tech15696 avatar image
eric-tech15696 answered Phong Vu commented
Hi Phong thank you.

You are right, I can't seem to log into https://developers.ringcentral.com/api-reference with the credentials for the phone number (+1205-xxx-xx05) I'm trying to send from. Those credentials work on the Sandbox Admin Portal and Sandbox Glip but not on the API.

Let me know how I can log in using that number.



1 comment
1 |3000

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

Phong Vu avatar image Phong Vu ♦♦ commented ·
Hi Eric,

It depends on how your app is authenticated.

If the authentication is password flow, you just provide the user's phone number and the password of that user/extension. Alternatively, you can use the main company number and the extension number (e.g. 102), but the password still must be the password for that extension.

If the authentication is 3-legged, you will have to implement the Authorization Code Flow for users to login.

Note, you cannot use the API explorer to try out API call for any other extension except the default 101 extension.

I recommend you to check out the SMS/MMS tutorials to see how easy to send SMS from your own code
0 Likes 0 ·
Tyler Liu avatar image
Tyler Liu answered
Ericplease post your code here(without credentials) if you need further help.
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