API ratelimit
Am I lost or does the API not return any ratelimt headers like remaining? If so could it be possible to add that since handling ratelimit is really annoying without that
28 Replies
Hi. They should be returned to you. Which endpoint are you on and what is your bot id?
https://api.kiaibot.com/v1/guild/${guildId}/member/${userId}
and 1052574339662348328One moment
You got a 429 code here too right?
Nope 200 and a valid response with leveling data
is this UTC time and does your IP start with with 172.20
yes and no
ip starts with 5.253
Alright so you aren't currently getting rate limited; the rate limit headers and info are currently only given on a 429 (see
ratelimit
model at the bottom of the API docs). If you want I can add adding rate limit info on 2XX
status codes as a TODO on our side and we can add this?Yes please
Counting up every minute in order to not hit it really annoying and hard to do xD
Also it talkes about a temporary ban is that similar of the time to amari?
can you rephrase this? After you hit the ratelimit you should get both headers for reset after and reset after in body
In the docs it says
you will be temporarily banned from making requests to the API.
and I mean if this "temporary" is the same as at amari where you get banned for 60m
also is resetAfter
in seconds?I don't think it is at 60 minutes constant. You should rather just look at the resetAfter which is in seconds. The headers also return X-RateLimit-Reset which is a UNIX timestamp
I've added this is a TODO and I can ping you here when it gets added if you want
Sure
oh also, note that the X-RateLimit-Reset UNIX timestamp is also in milliseconds unlike Discord's X-RateLimit-Reset in seconds
Good that you mentioned me I was about to do * 1000 :OMEGALUL:
lmao
I hope that the amari support is so active like you guys so that I finally can finish this stuff fr
Amaribot API support is me :P
You dont even response to dms I dont expect you to response there :Sus:
uhhhh brb
xD
Shadow moment fr
Solution
@sean
easiest PR ever
Making this as solved, you can reply here if you have any issues
should be deployed in a few minutes
pog