Skip to content
Fluxer API

Rate limits

When you send too many requests, the HTTP API returns 429 with code set to RATE_LIMITED. Wait retry_after seconds from the response body and send the request again.

Every HTTP API and Admin API operation declares a bucket, and its reference section says how many requests the bucket allows. A bucket name with a path parameter, such as guild:emojis:list::guild_id, has a separate allowance for each value of that parameter.

Each caller has its own allowance, and a user session, a bot token, an Admin API key and an OAuth2 application count as separate callers even on the same account. A request with no token counts against the client IP address, or its /64 for IPv6.

Each request also counts against a global bucket of 50 requests per second for each caller. An account with the HIGH_GLOBAL_RATE_LIMIT flag gets 1,200 requests per second, and an account with RATE_LIMIT_BYPASS skips the global bucket and every route bucket. Executing a webhook, and getting, editing or deleting its messages through the webhook’s token URL, don’t count against the global bucket.

Buckets refill continuously. A request still counts when the API rejects it with an error.

A 429 body has the fields of the error response and two more.

FieldTypeDescription
codestringRATE_LIMITED, or a more specific code from one of the operation limits
messagestringThe rate limit message in the request’s locale
globalbooleanWhether the global bucket denied the request
retry_afternumberThe seconds to wait, as a decimal (at least 0.001) for a bucket denial and in whole seconds for most operation limits
{
"code": "RATE_LIMITED",
"message": "You're being rate limited.",
"global": false,
"retry_after": 0.428
}

Every 429 has Retry-After. A 429 with the rate limit response object also has X-RateLimit-Scope, and a route bucket denial has the other X-RateLimit-* headers too. Successful responses have the route headers only for a bot token or a webhook token.

FieldTypeDescription
Retry-After?stringThe seconds to wait, rounded up to a whole number (at least 1)
X-RateLimit-Scope?stringThe scope that denied the request
X-RateLimit-Global?stringtrue when the global bucket denied the request, sent with no route headers
X-RateLimit-Limit?stringThe most requests the route bucket allows at once
X-RateLimit-Remaining?stringThe requests the route bucket allows right now, 0 on a denial
X-RateLimit-Reset?stringThe Unix time in seconds when the route bucket is full again
X-RateLimit-Reset-After?stringThe seconds until the route bucket is full again
X-RateLimit-Bucket?stringA 16-character hex ID for the route bucket, left out on an operation limit

The reset headers say when the bucket is full again, and retry_after says when you can send one more request. Browser clients can’t read these headers across origins and should use retry_after from the body.

ValueDescription
userA route bucket, counted for you alone
globalThe global bucket
sharedAn allowance shared with other members, such as the announcement channel limits
  • Use retry_after from the body over the Retry-After header, which is rounded up to whole seconds.
  • When global is true, pause every request with that token.
  • For a bot, read X-RateLimit-Remaining on successful responses and slow down before it gets to 0.

Some operations have extra limits apart from the route and global buckets, and RATE_LIMIT_BYPASS doesn’t skip them.

These return 429 with the rate limit response object and headers.

OperationLimit
Log in with a password5 per 15 minutes for one email address, and 10 failed logins per 30 minutes from one IP address
Register an account3 per 15 minutes for one email address, 3 per hour for one IP address and 15 per hour for one subnet
Resend email verification3 per 15 minutes for one account
Request password recovery5 per 30 minutes for one email address and 20 per 30 minutes for one IP address
Start email change3 code sends to the current address and 5 to the new one per 15 minutes, and one every 30 seconds per ticket
Start password change3 code sends per 15 minutes, and one every 30 seconds per ticket
Submit message report flow5 reports per hour for one reporter, 3 in one channel, 4 in one community and 20 for one message from all reporters
Create DSA report5 reports per hour for one reporter, shared with the other report routes

On an instance where people sign in with a username, a password login allows 5 attempts per 15 minutes for one username from one IP address and 100 failed logins per hour for one username, and the IP address limit still applies.

Registering an instant account allows 5 per hour and 20 per day from one IP address and 40 per hour from one subnet instead.

Resend IP authorization allows one resend per ticket, 30 seconds or more after the ticket was issued. An earlier resend returns 429 IP_AUTHORIZATION_RESEND_COOLDOWN with retry_after and resend_available_in in the body, a Retry-After header and no X-RateLimit-* headers. A second resend returns 400 IP_AUTHORIZATION_RESEND_LIMIT_EXCEEDED.

These return X-RateLimit-Scope set to shared, because every member who publishes or edits uses the same allowance. Announcement channels has the other limits.

LimitCode
10 crossposts from one channel, then one every 6 minutesMESSAGE_CROSSPOST_RATE_LIMITED
3 edits of one published message, then one every 20 minutesPUBLISHED_MESSAGE_EDIT_RATE_LIMITED

These return 400 INVALID_FORM_BODY with a validation error whose code says which limit you hit, and no retry_after or rate limit headers. The username limit applies to Modify current user and Update bot profile. The other profile limits apply to Modify current user and to Modify current guild member, which counts them separately in each guild.

ChangeLimitValidation code
Username5 username or discriminator changes per 3 hoursUSERNAME_CHANGED_TOO_MANY_TIMES
Biography25 changes per 30 minutesBIO_CHANGED_TOO_MANY_TIMES
Pronouns25 changes per 30 minutesPRONOUNS_CHANGED_TOO_MANY_TIMES
Accent color25 changes per 30 minutesACCENT_COLOR_CHANGED_TOO_MANY_TIMES
Avatar25 changes per 30 minutesAVATAR_CHANGED_TOO_MANY_TIMES
Banner25 changes per 30 minutesBANNER_CHANGED_TOO_MANY_TIMES
Voice activity sharing1 change per 24 hoursVOICE_ACTIVITY_SHARING_ON_COOLDOWN
TOTP login10 attempts per 15 minutes, and 5 per 5 minutes on one MFA ticketINVALID_CODE
Sudo mode with TOTP10 attempts per 15 minutesINVALID_MFA_CODE

The TOTP login limits also apply to Complete login with WebAuthn MFA, and when you hit the MFA ticket limit, the ticket is deleted and you have to log in again.

When a channel’s rate_limit_per_user is N, each member can send one message every N seconds. A send that comes too early returns 400 SLOWMODE_RATE_LIMITED with retry_after in the body and a Retry-After header. Bots and members with BYPASS_SLOWMODE aren’t limited. Get channel slowmode state returns how long you have to wait.

The Gateway has its own limits in Gateway limits and rate limits. The Media Proxy API doesn’t count requests.