31103: Length of parameters cannot exceed MAX_PARAM_LENGTH.
VOICE
ERROR
This Programmable Voice error indicates the request was rejected because the total length of custom parameters exceeded the allowed maximum. In Twilio's Voice SDKs, this corresponds to the 311xx malformed request family and specifically to "The total length of parameters exceeds MAX_PARAM_LENGTH."
For the Voice JavaScript SDK, the combined size of all params you pass when connecting a call must not exceed 800 bytes. Exceeding this limit triggers this error.
- The params object passed to device.connect in the Voice JavaScript SDK exceeds the documented 800 byte combined limit.
- Sending large key or value strings as custom parameters during call setup causes the total to surpass recommended limits for custom parameters.
- Reduce the total size of all custom parameters to under 800 bytes when initiating a call with the Voice JavaScript SDK.
- Keep custom parameters minimal and rely on your application's TwiML webhook to receive those parameters and fetch any additional context server side after Twilio appends them to your request.
- Ensure you are using the correct parameter structure for your SDK version when placing calls, for example ConnectOptions.params in JS SDK v2 or the top‑level params object in JS SDK v1, to avoid related malformed request errors.