Nirmal Babu avatar image
Nirmal Babu asked Nirmal Babu commented

Request rate exceeded when sending sms

Please find the error response below:

 HTTP Response
 status code: 429
 server: nginx
 Date: Wed, 27 Apr 2022 17:17:34 GMT
 Content-Type: application/json;charset=utf-8
 Content-Length: 161
 Connection: keep-alive
 RCRequestId: edfe64b6-c64d-11ec-995d-0050568d1600
 RoutingKey: IAD01P18PAS04
 Retry-After: 2
 Content-Language: en-US
 X-Rate-Limit-Group: sms
 X-Rate-Limit-Limit: 60
 X-Rate-Limit-Remaining: 53
 X-Rate-Limit-Window: 60
   \"errorCode\" : \"MSG-305\",
   \"message\" : \"Request rate exceeded\",
   \"errors\" : [ {
     \"errorCode\" : \"MSG-305\",
     \"message\" : \"Request rate exceeded\"
   } ]
 HTTP Request

Can you please help us in finding the root cause?

errorssending sms
1 comment
1 |3000

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

I posted an answer below, but a colleague of mine followed up with me to let me know that he observed some irregularities in your example above, so we are investigating further.

0 Likes 0 ·
Phong Vu avatar image
Phong Vu answered Nirmal Babu commented

Since the /sms endpoint rate limit group is Medium, meaning 40 API calls (40 messages) per 60 seconds. You should call the endpoint following the Medium rate limit. The best approach is to send a message every 1.5 secs (DO NOT calling as fast as possible then wait for the next window)

Please read this article and use the 2 option (Call and wait based on the average rate limit)

The header returns a special sms group which may not be applied to your app and we are investigate this.

1 |3000

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

From the error, we can see that the rate limit is not exceeded but why did it say 'Rate limit exceeded'? X-Rate-Limit-Limit: 60 X-Rate-Limit-Remaining: 53 Usually, when the rate limit is exceeded, we see the X-Rate-Limit-Remaining value to be 0. But that is not the case here. I guess you are investigating the same, any update on this?

0 Likes 0 ·

Recently, we made some change to have a special sms rate limit, which shown the group name as "sms" and the rate limit at 60 as you can see. However, the /sms endpoint is actually does not use that rate limit group, but rather in the Medium group as stated in the API reference documentation.

We are going to fix this in the future. But for now you should not use the value from the rate limit headers for the /sms endpoint.

1 Like 1 ·

Sure Phong, Thanks for the update!

0 Likes 0 ·
Byrne Reese avatar image
Byrne Reese answered

@Nirmal Babu This response is actually coming from our API gateway which helps us manage the throughput of any given operation or endpoint. Your application is being "throttled" meaning it is sending too many requests within a given time window. The error will go away in time. To learn more about throttling and rate limits, go here:

Does this answer your question?

1 |3000

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

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys