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
RingCentral SMS API Rate Limit and PHP
Tags: rest api
May 19, 2020 at 2:52pm   •   1 replies  •  0 likes
Nicholas2577411036

Hello,

I am developing a small web app that will allow a small number of administrators to send company-wide SMS messages from our main phone number (I've been told this is a requirement - one number/extension) to employees. We are using this system to send reminders and emergency alerts to up to 250 employees (worst case). On average, these alerts will go to 80-150 people.

I am running into issues working around the API's SMS rate limit using PHP. I was hoping someone could shed some light on the issue and offer suggestions or a workaround. Sending 120 SMS messages would take a total of 3 minutes and PHP will time out after 30 seconds by default. I have tried extended the limits PHP puts in place, but regardless I still run into problems - and this is just not ideal to have a web page spinning for 3+ minutes. I was contemplating offloading the API calls to another server-side language/script instead of using PHP, but I am not sure the best way to go about this.

I have read this article from another forum post, which described a wait period between API calls; however, that still leaves the page spinning and I am not able to use the sleep() function on a Windows server without it counting against the timeout period - linux does not handle sleep() the same.


Any assistance or ideas would be appreciated!


Best regards,

Nick

1 Answer
answered on May 19, 2020 at 5:29pm  

First of all, when it comes to sending SMS messages from an application, please be aware of the A2P SMS regulations and limitations. Read this blog for some guidelines about P2P and A2P SMS

In your case, if you don't exceed or break the FFC regulations (mentioned in the referred blog), then you can use any normal RingCentral phone number and send SMS messages as you have done it. To the problem with the API rate limit, can you make a wait loop on the front end (your web app) and control the speed accordingly? This approach is not a good one but just to work around the problem.

The perfect solution is to use RingCentral Toll-Free SMS number with the A2P SMS API, a new endpoint which can be early accessed upon request (fill out this form if interested). With this new API, 1) it is dedicated for A2P SMS; 2) it can send more than 3 messages per second, and all SMS messages can be sent from a batch (a single API call).

If you have a toll free SMS number, and you want to send SMS ad-hoc, check out if this application can help, instead of implementing your own app. All you need to do is to export recipient numbers to a .CSV file and upload the file when sending messages.


 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