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
============
HTTP POST https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/sms
Can you please help us in finding the root cause?
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.
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.
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?
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.
Sure Phong, Thanks for the update!
@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:
https://developers.ringcentral.com/guide/basics/rate-limits
Does this answer your question?
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