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
SMS API Group?
Tags: rest api
Jan 22, 2020 at 4:00pm   •   2 replies  •  0 likes
Andy Miscuk

Is the SMS API in the Auth or Medium API Group?

On this site i find:

"RingCentral currently allows you to send a maximum of 40 messages per minute per RingCentral number through our SMS API. If you need to send more than 40 messages per minute, please utilize multiple numbers. For more information, please contact our developer support. "

But while developing my app I was limited to 5 messages. Is this because it is DEV and it will go up in production? Or am i doing something wrong?


Thanks!


2 Answers
answered on Jan 24, 2020 at 3:49pm  

Very likely you login every time you call send an SMS message, and the /auth endpoint has API call limit at 5 calls per 60 secs.

To avoid that, login once then call the SMS endpoint repeatedly. E.g.

var SDK = require('ringcentral')
var rcsdk = new SDK({
      server: RINGCENTRAL_SERVER,
      appKey: RINGCENTRAL_CLIENTID,
      appSecret: RINGCENTRAL_CLIENTSECRET
  });
var platform = rcsdk.platform();
platform.login({
      username: RINGCENTRAL_USERNAME,
      password: RINGCENTRAL_PASSWORD,
      extension: RINGCENTRAL_EXTENSION
      })
      .then(function(resp) {
        for (var i=0; i<40; i++)
          send_sms()
      });

function send_sms(){
    platform.post('/account/~/extension/~/sms', {
             from: {'phoneNumber': RINGCENTRAL_USERNAME},
             to: [{'phoneNumber': "1234567890"}],
             text: 'Hello World from Node JS'
        })
        .then(function (resp) {
          var jsonObj = resp.response().headers
          console.log(jsonObj['_headers']['x-rate-limit-limit'][0])
          console.log(jsonObj['_headers']['x-rate-limit-remaining'][0])
          console.log(resp.text())
          console.log("SMS sent. Message status: " + resp.json().messageStatus)
        })
        .catch(function(e){
          console.log(e.message)
        });
}


More about API Rate Limit

It is not true that if you want to send more than 40 messages, you should use multiple numbers. Read this blog for detailed info.


 0
answered on Jan 25, 2020 at 7:41am  

Hi,

You can send more than 40 messages and it all about how you are sending the messages. Please follow the below link for more details.

https://medium.com/ringcentral-developers/ringcentral-api-rate-limit-explained-2280fe53cb16


 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