Overview
Thelimits endpoint is a public query procedure that retrieves chat configuration limits for a specific channel. These limits control message length and rate limiting behavior.
Procedure Type
Query - Public procedure (no authentication required)Input Parameters
The channel identifier to retrieve limits for
Response Structure
Maximum allowed length for chat messages in this channel
Number of messages allowed within the rate limit window
Time window for rate limiting in milliseconds
Channel-Specific Overrides
Limits can be configured per-channel using theCHAT_LIMITS_OVERRIDES environment variable. If no override exists for the requested channel, default limits from the following environment variables are returned:
CHAT_DEFAULT_MAX_MESSAGE_LENGTHCHAT_DEFAULT_RATE_LIMIT_COUNTCHAT_DEFAULT_RATE_LIMIT_WINDOW_MS
Example Usage
Example Response
Implementation Details
The limits endpoint is implemented atchat.ts:13-17 and uses the getChatLimitsForChannel function from chatLimits.ts:33-48 to retrieve channel-specific configuration.
Use Cases
- Validate message length client-side before sending
- Display rate limit information to users
- Adjust UI behavior based on channel-specific limits
- Configure chat input components with appropriate constraints