question

Andy Miscuk avatar image
Andy Miscuk asked ·

SMS API Group?

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!


smsrate limitapi group
1 |1000 characters needed characters left characters exceeded

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 ·

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.

Share
1 |1000 characters needed characters left characters exceeded

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

Khadhar Koneti avatar image
Khadhar Koneti answered ·

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

Share
1 |1000 characters needed characters left characters exceeded

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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