News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Error sending SMS from non-main number
Tags: sms and text messaging, sending sms
Nov 8, 2023 at 7:37am   •   2 replies  •  0 likes
James Pee

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

2 Answers
answered on Nov 8, 2023 at 9:25am  

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.


 0
answered on Nov 8, 2023 at 10:34am  

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?


 0
on Nov 8, 2023 at 3:33pm   •  0 likes

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.



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us