Discord · api · fg-0449

Discord send fails with Invalid Form Body when the message is longer than 2000 characters

If you see DiscordAPIError[50035]: Invalid Form Body, the cause and the fix for Discord are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
DiscordAPIError[50035]: Invalid Form Bodycontent[BASE_TYPE_MAX_LENGTH]: Must be 2000 or fewer in length.Bot relaying LLM or log output fails only on long answers
Cause
Message content is capped at 2000 characters for bots, webhooks and interaction replies alike. Discord counts Unicode code points, so JavaScript string length can overcount emoji but never undercounts.
Fix
Split long text into chunks of at most 2000 characters, or send it as a file attachment.
Apply
for (const part of text.match(/[\s\S]{1,2000}/g) ?? []) { await channel.send({ content: part, allowedMentions: { parse: [] } }); }
Affected
Discord API v10 messages, webhooks and interaction responses, as of 2026-10
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun