api icon indicating copy to clipboard operation
api copied to clipboard

https://lichess.org/inbox/{username} report {"error":"Error 429: Too many requests! Try again later."} despite 1 sec rate limt

Open Ptg2 opened this issue 5 years ago • 3 comments

Hello

An application using 1 sec rate limiting on requests runs into

{"error":"Error 429: Too many requests! Try again later."}

Unless there is some more complex rate limitations this seams to be a bug

Please note that less than 50 inbox request has been sent in the last 24H

Ptg2 avatar Mar 01 '21 13:03 Ptg2

There's no guarantee that you won't get rate limited simply by keeping requests to 1/s. The API docs explicitly state you should start with 1/s but wait at least 1 min after getting a 429.

benediktwerner avatar Apr 29 '21 09:04 benediktwerner

Which endpoint did you hit and how many times did you hit it?

ornicar avatar Apr 29 '21 09:04 ornicar

Even at a rate of 1 message per 1min 10 sec does not work in certain cases and proves there is a more complex rate limit algorithm in place. Unfortunately, the API documentation seems to be silent on this.

Using trial and error I could reverse engineer what seems to be what in place is that an additional rate limit is impose of a max of 20 messages per 24H if you are sending a message to someone you have never messages successfully before. I suggest that this is validated as a correct interpretation and this information is added to the API reference documentation.

Ptg2 avatar Apr 29 '21 15:04 Ptg2