These are the limits of the production Chat API. They are the single source for every other page of this site.
Limits are fixed windows. A request over its limit gets 429 with error: "rate_limited" and a Retry-After header in seconds. See Handle errors and retries.
| Applies to | Counted per | Limit |
|---|
| Machine clients, all routes | client_id | 600 per 60 s |
| Sending a message | user | 30 per 10 s |
| User lookup | user | 20 per 10 s |
| Chat web sign-in only | client IP | 20 per 60 s |
| What | Limit | If you exceed it |
|---|
| Request body | 256 kB | Larger bodies are rejected with 413. |
| Message body | 10,000 characters | Longer bodies are rejected with body_too_long. |
| Attachments per message | 10 | More are rejected with too_many_attachments. |
| Page size | default 50, maximum 100 | A larger limit is capped. |
| Channels in one realtime credential | 100 | Plus one PUBLIC channel being viewed. |
| What | Lifetime | Note |
|---|
| User token from token exchange | at most 10 minutes | No refresh token. Exchange again. |
| Realtime credential | at most 10 minutes | Reconnect with a fresh one before it expires. |
- Create one
ChatClient per process. It caches its machine token until shortly before it expires.
- Cache the user’s Chat token in your app and renew it a minute before expiry. Do not call your token route per request.
- Send typing signals at most every few seconds, and presence heartbeats about every 30 seconds.
- On
429, wait Retry-After seconds, then retry with backoff.