WhatsApp Cloud API · error code

WhatsApp error 2388299: Leading or trailing parameters not allowed

ConfigurationTemplates & Flows

Last verified against Meta for Developers - Cloud API error codes

What WhatsApp returns
Variables cannot be at the start or end of the template.

What error 2388299 means

Code 2388299 rejects a template whose body begins or ends with a variable. The rule is literal: if the first or last token of the text is a placeholder such as {{1}} or {{customer_name}}, creation fails, even when the template would read naturally once filled in.

It catches many developers on the most natural greeting, {{1}}, your order has shipped, and on sign-offs that end with a link or code variable. Trailing punctuation after the variable is the usual workaround people try; whether a given character is enough is decided by Meta's validator, so the safer fix is to add real words before and after.

Nothing is wrong with your braces or numbering here. If those were broken you would see 2388072 instead. This error is purely about position.

What it looks like

{
  "type": "BODY",
  "text": "{{1}}, your package is out for delivery. Track it here: {{2}}"
}

(starts and ends with a variable, so creation fails with 2388299)

Why it happens

  • A greeting that opens with the customer name variable.
  • A body ending with a tracking link, coupon, or OTP variable.
  • Templates generated by concatenating a variable onto fixed text.
  • Translations where word order moves the variable to the edge of the sentence.

How to fix WhatsApp error 2388299

  1. 1Rewrite the opening so fixed words come first, for example "Hi {{1}}, your order has shipped".
  2. 2Add a closing phrase after a trailing variable, such as "Use code {{2}} at checkout today."
  3. 3Check every language version, since word order differs between translations.
  4. 4Resubmit the corrected body for review.

How to stop it recurring

Adopt a house style where every body opens with a fixed salutation and closes with a fixed sentence. Have translators keep that structure, and lint the first and last tokens in your template builder. The template checker catches edge variables before Meta does.

Official reference: Meta for Developers - Cloud API error codes. See all WhatsApp error codes or the WhatsApp limits and quotas.

Related codes

Error 2388299 - quick answers

What does WhatsApp error 2388299 mean?

Code 2388299 rejects a template whose body begins or ends with a variable. The rule is literal: if the first or last token of the text is a placeholder such as {{1}} or {{customer_name}} , creation fails, even when the template would read naturally once filled in. It catches many developers on the most natural greeting, {{1}}, your order has shipped , and on sign-offs that end with a link or code variable.

How do I fix WhatsApp error 2388299?

1. Rewrite the opening so fixed words come first, for example "Hi {{1}}, your order has shipped". 2. Add a closing phrase after a trailing variable, such as "Use code {{2}} at checkout today." 3. Check every language version, since word order differs between translations. 4. Resubmit the corrected body for review.

Stop debugging WhatsApp by hand

Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.