- General Principles
- Rate limits prevent spam and service overload across Discord APIs
- Limits apply to both individual users and globally
- Authentication determines user limits, IP addresses apply without authentication
- Rate Limit Types
- Per-route limits exist for individual endpoints and HTTP methods
- Global limits apply to total requests, independent of per-route limits
- Top-level resources (channels, guilds, webhooks) are currently limited
- Header Format
- API returns rate limit headers in response to most requests
- Header includes limit, remaining requests, reset time, and bucket identifier
- Exceeded limits trigger 429 response with detailed information
- Limits and Restrictions
- Global limit is 50 requests per second
- Invalid requests (401, 403, 429) trigger temporary API bans
- Webhooks are not bound to global rate limits
- Large bots may exceed 50 requests per second limit
- Error Handling
- Invalid requests should be avoided through proper authorization
- Unavailable resources return 202 response with retry option
- CloudFlare bans indicate global rate limit issues