queen-raae / prune-your-follows

15 stars 1 forks source link

Need to distinguish between user rate limits and app rate limit #64

Closed raae closed 1 year ago

raae commented 1 year ago

There seems to be no specific data attached to the app rate limit errors, but it seems to have the information about the user rate limit so we could check if has ran out and if so it's user, if not it's app.

Headers when user limit 429:

"date": "Fri, 16 Dec 2022 12:53:25 UTC",  
"x-rate-limit-limit": "50",
"x-rate-limit-remaining": "0",
"x-rate-limit-reset": "1671196077", // Fri Dec 16 2022 13:08:20

Headers when app limit 429:

date: Fri, 16 Dec 2022 02:09:51 UTC,
x-rate-limit-limit: 50, 
x-rate-limit-remaining: 49, 
x-rate-limit-reset: 1671157491, // Fri Dec 16 2022 02:25:00
raae commented 1 year ago

Limit rest seems to be per user, so how can I figure out when we get a 24 hour ban?