BS
Buape Studios•10mo ago
sean

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