Forum Discussion

Jered's avatar
Jered
User
2 years ago

API rate limit

I've read that there is an 8 call per second limit and the daily limit is 1,000,000 calls, however, recently every call I've been making has been hitting the rate limit, and I'm only making one call at a time, even if I wait several minutes in between calls. Only every so often will the call go through. My only thought behind this could be because I have 5 different apps set up that are being used when I make calls. I have open access under my developer account. Is there a limit to the number of apps (separate client ids and secrets) you can run sequentially? 

2 Replies

Replies have been turned off for this discussion
  • kjm's avatar
    kjm
    Trusted Cover User

    sounds weird..

     

    I've been wondering about this as well...we're moving our internal app online and I am wondering what 8 calls per second actually means

     

    you have 5 different apps..you say they are all making one call and waiting several minutes? Doesnt sound like to me you should be hitting your limit

     

    What are the calls? could one call be resulting in many api calls..for example you might classify one call as "creating an employee" which migh result in fact being many calls once all the relevant entities and objects are created

     

    What are you using development wise? .NET SDK? how are you querying the api?

     

    If for example I make once call and get 100 employees is that simply one call to the api? I am assuming that counts as one call only. but if you want to get the payroll details for each of those then that would be 100 calls right?

     

    If you put Fiddler on you should be able to see the calls that are going out...this is what I plan to do...would be great is there were some other tools that could measure the amount of calls that are going out from an app

     

    I'm sure there must be some out there...anyone?

     

     

     

    • Jered's avatar
      Jered
      User

      I'm just using a Python script at the moment using the requests library. The first step is to grab the full account list for three companies. I even set $top to it's maximum so I can ensure only 1 call per company is made. As part of the script I made it so that if I get a "Hit-Rate Limit" 403 error, the script sleeps for 5 seconds before trying again. In some instances I blitz through all three calls in about 4 seconds (when the limit isn't hit), then other times I will get stuck in a constant 403 error loop and it can take up to 2 minutes before finishing all three calls.

       

      Since my first post I thought maybe it was because I had registered 5 apps, so I deleted 3 and now only have 2. I'm still getting rate limit errors. I thought maybe it was my script, however, even when I use Postman I get the errors if I don't wait more than 5 seconds before calling another endpoint. I checked the Postman Console to see if more than one API call was made each time I hit 'Send' and only one call is made. 

       

      I genuinely believe the claim of 8 calls each second is incorrect (or MYOB are experiencing issues with their server), I have no idea how people are able to concurrently make API calls with the MYOB API, I can't even make them sequentually without forcing my script to sleep for 5 seconds between each call.