Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Chat Limits

Twilio Programmable Chat has a number of limits in place which will constrain certain elements of the system and how it is used. Some limits have default values and can be configured, others are not able to be changed.

The Chat limits are enforced at Service instance, User and Channel levels. These limits are set within a Service instance scope.

Counter Limits

Counter limits are related on object list counts/maximum enforced length. If an enforced count count limit will be exceeded by means of a command, this command will be rejected with a 403 status code along with a more specific chat error code and description.

Channels per User

Default: 250 Maximum: 1,000

Configured via: Service Instance configuration: Limits.UserChannels

Members per Channel

Default: 100 Maximum: 1,000

Configured via: Service Instance configuration: Limits.ChannelMembers

Throughput Limits

Limits of this type will impact the number of simultaneous actions that can be performed within a Service Instance.

Actions Per Second

APS is the guaranteed Actions Per Second that a Service instance will support. All Service instances have a baseline of 30 APS. Programmable Chat will allow short bursts above the baseline APS - up to 5x the baseline. If the bursts become sustained throughput, the Service will start rejecting requests. If this happens, the APS cap would need to be increased for that service instance (please contact support in this instance).

Please note that the APS limit is enforced for commands such as sending a Message or creating a Channel - not Read actions.

How This Works

The request limit is based on average request rate in 5s sliding window. For example, for 30 req/s limit we allow burst up to 150 req/s. After this your application client request logic needs to wait until average goes below threshold to make any command requests again.

Requests that go over APS threshold are rejected with HTTP status code 429 Too Many Requests.

Data Length/Size Limits

Limits for user provided data in UTF-8 characters (unless otherwise specified).

Resource Property Limits

Resource Field Maximum length / Size
ServiceInstance FriendlyName 256
Channel FriendlyName 256
Channel UniqueName 256
Channel Attributes 32kb
Channel CreatedBy 256
User Identity 256
User Attributes 32kb
User FriendlyName 256
Message Body 32kb
Message Attributes 4kb
Message CreatedBy 256
Message LastUpdatedBy 256
Role FriendlyName 256
Credential FriendlyName 64

Media Messaging

Maximum Media file size: 150mb

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.