article

vb avatar image
vb Posted · · edited ·

When you receive a 429 - Too Many Requests, here is what you should do

{
                 
"errorCode": "CMN-301", "message": "Request rate exceeded", "errors": [ { "errorCode": "CMN-301", "message": "Request rate exceeded" } ] }
Response code : 429????


                                     

Solution:

Check the usage plan under Applications Information section for your application. 

While you hit 429 error, your application will stay in penalty interval for 60 seconds. During this time, donot make any calls. 

You can avoid hitting 429 error by following usage plan RPM( Requests per Minute) data for APIs. 
aaa
4 comments
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.

In order to see your usage plan go to MY ACCOUNT and click on the Application.  There you will see a link in the description section named Usage Plan
0 Likes 0 · ·
I would like to understand this more fully, as we started getting the 429 error after optimizing our database (our app is running faster now). Does this happen on a user-account basis? Or is it on an application basis? We supply an app that is being used by several different users with different RingCentral accounts simultaneously. My main concern is - when performing requests for one particular user, if our app gets this error for that request, do we need to throttle other requests for the other, unrelated users at that time?
0 Likes 0 · ·
You are going to need to move toward a centralized server architecture that does the RingCentralAPI Requests and then relays the cached data to client apps either via a DB or some type of connection if you hope to scale. If you have multiple client apps in the wild all pulling queries at random then you have zero control over how many requests total you are sending in a given time-frame. Furthermore, it is likely that your client apps are requesting the same exact data which is wasteful and a centralized cache would eliminate multiple identical queries. 

If I were you, I would use web-sockets to establish a link between a server app and the client apps and then use JSON as the mode of communication. You could have the server make a query, and then push that response to all connected Websockets.
1 Like 1 · ·
Rate Limit for an application is set per User ( RingCentral Extension ) per app.


So when you encounter an HTTP 429 error for a particular user ( RingCentral account ) it would not apply for the other User/Users/RingCentral accounts. 

For more information please take a look at our API reference under the title :

API Rate Limits

0 Likes 0 · ·

Article

Contributors

vb contributed to this article