a month ago
Is it possible for someone to rate limit the Discord API on their Railway container then it has a knock on affect on my container?
Attachments
21 Replies
For context. my API doesn't spam request the Discord API only sending a few requests per second.
a month ago
Did you provide an authorization header?
My code has been working for a few months with no changes it was just today the error was shown
a month ago
Answer to your original question, no. An IP rate limit would only happen if you haven't supplied the authorization header as outbound IP addresses are shared.
a month ago
(no markdown available for this content)
a month ago
The other answer would be making too many invalid requests, causing Discord to temporarily rate limit you.
a month ago
I'd try logging the request header and body, as they may provide some useful debugging information.
Attachments
My first HTTP request doesn't contain an auth header it's only the next request after the access token that uses my bot token
The response also wasn't
{
"message": "The resource is being rate limited.",
"retry_after": 1336.57,
"global": false
}
which is provided in the developer docs relating to the discord bot token
a month ago
Well, again, as mentioned above, this rate limiting is not IP-based as it seems like you have provided a valid authorization header.
All bots can make up to 50 requests per second to our API. If no authorization header is provided, then the limit is applied to the IP address.
a month ago
Nevermind I misread, sorry.
Well, then yes, this is an IP based ban. Railway cannot do anything about this.
a month ago
Well it's possible someone that's using Railway to call Discord API that also happens to share the same outbound IP address as your container.
a month ago
I think so? I wouldn't exactly say "rotate" but outbound IPs may change over time.