Forum Discussion

TrakDev's avatar
10 months ago

"API key has exceeded the per-second rate limit"

I have an API integration between my web-app and MYOB.
I authorize the user using the OAuth flow and retrieve their access_token.
However when I then make a call to "https://api.myob.com/accountright" I get a 403 error "API key has exceeded the per-second rate limit"
The only semi-official documentation of what the actual rate-limt I can find is here, where it says it is 8 requests per second.
https://community.myob.com/t5/MYOB-Business-API/API-v2-rate-limits/td-p/693742
Regarless of the limit, I have tried throttling my requests to once every 3 seconds and I still get the 403 error.
What is occuring and how do I fix it?

  • Turns out the issue was you can only have 2 active api keys at once.

    If you use 3 keys one of them will be automatically deactivated.

    The only way we found this out was contacting myob support. We then had too send them the two keys we wanted reactivated.

    To summarize:

    1. Nowhere is this 2 active key limit mentioned that I can find
    2. My company was not informed that our main live key had been deactivated
    3. It's not clear from the error you recieve back from the myob api that a deactivated key is the issue (what has this got to do with rate limits?)
    4. It's not clear on the myob dev dashboard (https://my.myob.com.au/au/bd/DevAppList.aspx) which keys are active and which are not or what you can do about it

    Very annoying.

  • Will_H's avatar
    Will_H
    MYOB Moderator

    Hi TrakDev ,

     

    I'm not from our API support team, but I have had some experience with these errors with one of our other products.

    It's possible that your account has been effectively locked for breaching the rate limit.  I mostly see this where someoen has error handling set to attempt antoher request immediately if there is a failure., with no maximum retries set.  In those cases you can put through a lot of requests in a short amount of time if something goes wrong.

    My advice is to try leaving it for 24 hours, and then testing a connection again (To see if the rate limit clears).  In conjunction with TrakDev's suggestion of the accounts page to check your actual usage, that might see you right.

     

    If not, best suggestion would be to reach out to our API support team directly at: https://apisupport.myob.com/hc/en-us



    PS: JeremyF  -- thanks for helping out another user, I appreciate it.  (And I'm sure they do too)

    • Thanks Will
      I also think something like a lock out may be occuring.
      I can confirm my api has made zero requests in the last 24 hours but I still get the same error, which makes no sense.

      I'll contact support directly.

      Cheers,
      Lucas

      • Turns out the issue was you can only have 2 active api keys at once.

        If you use 3 keys one of them will be automatically deactivated.

        The only way we found this out was contacting myob support. We then had too send them the two keys we wanted reactivated.

        To summarize:

        1. Nowhere is this 2 active key limit mentioned that I can find
        2. My company was not informed that our main live key had been deactivated
        3. It's not clear from the error you recieve back from the myob api that a deactivated key is the issue (what has this got to do with rate limits?)
        4. It's not clear on the myob dev dashboard (https://my.myob.com.au/au/bd/DevAppList.aspx) which keys are active and which are not or what you can do about it

        Very annoying.