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 when sending SMS through API
Tags: errors, sending sms
May 23, 2022 at 11:51pm   •   1 replies  •  0 likes
Nirmal Babu

Hi,

Getting the below error when sending SMS:

com.ringcentral.RestException: HTTP Response
=============
status code: 403

Server: nginx
Date: Mon, 10 Jan 2022 22:52:37 GMT
Content-Type: application/json;charset=utf-8
Content-Length: 207
Connection: keep-alive
RCRequestId: 01d0132a-7268-11ec-a52f-0050568c6525
RoutingKey: IAD01P18PAS05
Content-Language: en-US
X-Rate-Limit-Group: medium
X-Rate-Limit-Limit: 40
X-Rate-Limit-Remaining: 39
X-Rate-Limit-Window: 60

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

HTTP Request
============
HTTP POST https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/sms

Please help in finding the root cause

1 Answer
answered on May 24, 2022 at 7:19am  

See one of the getting started examples for learning how to detect if a phone number is enabled for SMS. Here is the code snippet in Node JS.

async function read_extension_phone_number(){
    try {
        var resp = await platform.get("/restapi/v1.0/account/~/extension/~/phone-number")
        var jsonObj = await resp.json()
        for (var record of jsonObj.records){
            for (feature of record.features){
                if (feature == "SmsSender"){
                    return send_sms(record.phoneNumber)
                }
            }
        }
    } catch(e) {
        console.log(e.message)
        process.exit(1)
    }
}

 0



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