Closed itstodSiik closed 2 years ago
Seems like the limit change was not yet applied on the server.. I am getting TooManyRequest errors now.
@richardrandak
The change is applied but the problem is that the ratelimiter doesn't handle the sliding window.
Please change the values to 5 requests per second instead.
I made a test to send 100 requests.. it fails even with the rate limiter set to 5 per 1 second. It does not fail with rate limiter set to 4 per 1 second..
We tried 1 per 0,2 second and that seems to work. Maybe thats the best implementation at the moment?
There might be a problem that the existing access tokens has still the old server side rate limit applied. I was trying with the one I am using in the tests and it was failing. So, this is might be true at least for the static auth tokens.
I made a new app and generated the standard auth token and the 5 request / 1 second works fine.
I will have to check with support how this actually work for existing tokens. For back-compatibility, I might have to make the rate limiter configurable.
Fortnox has changed the way they handle the ratelimits for the API. Suggested changes gets the SDK in line with new standards.