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
No description
Solution:
@sean
No description
Jump to solution
28 Replies
net-tech-
net-tech-9mo ago
Hi. They should be returned to you. Which endpoint are you on and what is your bot id?
sean
seanOP9mo ago
https://api.kiaibot.com/v1/guild/${guildId}/member/${userId} and 1052574339662348328
net-tech-
net-tech-9mo ago
One moment You got a 429 code here too right?
sean
seanOP9mo ago
Nope 200 and a valid response with leveling data
sean
seanOP9mo ago
No description
sean
seanOP9mo ago
No description
net-tech-
net-tech-9mo ago
is this UTC time and does your IP start with with 172.20
sean
seanOP9mo ago
yes and no ip starts with 5.253
net-tech-
net-tech-9mo ago
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?
sean
seanOP9mo ago
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?
net-tech-
net-tech-9mo ago
can you rephrase this? After you hit the ratelimit you should get both headers for reset after and reset after in body
sean
seanOP9mo ago
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?
net-tech-
net-tech-9mo ago
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
sean
seanOP9mo ago
Sure
net-tech-
net-tech-9mo ago
oh also, note that the X-RateLimit-Reset UNIX timestamp is also in milliseconds unlike Discord's X-RateLimit-Reset in seconds
sean
seanOP9mo ago
Good that you mentioned me I was about to do * 1000 :OMEGALUL:
net-tech-
net-tech-9mo ago
lmao
sean
seanOP9mo ago
I hope that the amari support is so active like you guys so that I finally can finish this stuff fr
Shadow
Shadow9mo ago
Amaribot API support is me :P
sean
seanOP9mo ago
You dont even response to dms I dont expect you to response there :Sus:
Shadow
Shadow9mo ago
uhhhh brb
sean
seanOP9mo ago
xD
MagicGamer ☄
MagicGamer ☄9mo ago
Shadow moment fr
Solution
Shadow
Shadow9mo ago
@sean
No description
Shadow
Shadow9mo ago
easiest PR ever
net-tech-
net-tech-9mo ago
Making this as solved, you can reply here if you have any issues should be deployed in a few minutes
sean
seanOP9mo ago
pog
Want results from more Discord servers?
Add your server