Skip to main content
Solved

Error sending SMS from non-main number

  • November 8, 2023
  • 3 replies
  • 143 views

We have been able to successfully send an SMS from the main number by using the admin user's JWT token and getting an access_token; however, when we try to send an SMS from a different number, we are getting the following error:

{ "errorCode": "FeatureNotAvailable", "message": "The requested feature is not available", "errors": [ { "errorCode": "MSG-242", "message": "The requested feature is not available" } ]}


the request looks like this for the main number:

curl --request POST --url 'https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/sms' --header 'accept: application/json' --header 'authorization: Bearer <redacted>' --header 'content-type: application/json' --data '{"from":{"phoneNumber":"13234714206"},"to":[{"phoneNumber":"4695859521"}],"text":"test"}'

and for the other number

curl --request POST --url 'https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/sms' --header 'accept: application/json' --header 'authorization: Bearer <redacted>' --header 'content-type: application/json' --data '{"from":{"phoneNumber":"13234714206"},"to":[{"phoneNumber":"4695859521"}],"text":"test"}'

Do we need to do something to enable sending SMS from the other number (13234714206)?

Best answer by PhongVu

Does the admin user (the one that owns the JWT token) owns the "other" phone number? If not, then he/she cannot send SMS message from that phone number.

Check the dev guide to learn more about the rules and sample code to detect user's own numbers.

If the user owns the phone number but the number does not have SMS feature, then submit a customer support ticket to provision the number.

3 replies

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • Answer
  • November 8, 2023

Does the admin user (the one that owns the JWT token) owns the "other" phone number? If not, then he/she cannot send SMS message from that phone number.

Check the dev guide to learn more about the rules and sample code to detect user's own numbers.

If the user owns the phone number but the number does not have SMS feature, then submit a customer support ticket to provision the number.


  • Author
  • New Participant
  • November 8, 2023

What is the best way to programmatically get a JWT token for another user? That is, if I have the admin user's JWT token, is there a way to create and/or obtain a JWT token for another user?


PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • November 8, 2023

Unfortunately, there is no way for a super admin to generate a JWT token for other extensions. We are considering to support that in the future though.

So, the only option is to ask a user to login the RingCentral developers portal to generate a JWT token.