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
Testing Rate Limits
Tags: sms and text messaging
Nov 17, 2022 at 9:13am   •   1 replies  •  0 likes
Ian Middelkamp

I am having trouble developing with rate limits in mind. Is there a way to simulate the rate limits being exceeded for sending sms and getting messages?

1 Answer
answered on Nov 17, 2022 at 9:51am  

It's very easy to exceed the rate limit. There is no way to simulate it but as you wish, just put the API call function in a loop and call more times than the rate.

This is a simply example using Node JS

for (var i=0; i<60; i++) {
    await send_sms()
}

async function send_sms(){
  try{
    var resp = await platform.post('/restapi/v1.0/account/~/extension/~/sms', {
             from: {phoneNumber: "fromNumber"},
             to: [{phoneNumber: "toNumber"}],
             text: "Hello from Node JS",
        })
    var jsonObj = await resp.json()
    console.log("SMS sent. Message status: " + jsonObj.messageStatus, jsonObj.id)
    var obj = resp.headers
    console.log(obj)
  }catch(e){
    console.log(await e.response.json())
  }
}

Please read this article to learn more about how to deal with API rate limit.


 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