Step-up OTP for sensitive actions via WhatsApp API
Sends a fresh one-time code via WhatsApp authentication template when the user confirms a sensitive account action.
Common errors
| Status | API response | Cause | Fix |
|---|---|---|---|
| 200 | Message was not sent: template is not defined | namespace, template or language is missing from the request body. | Send all three. Take namespace and the exact template name from GET /templates; language is an object: {"policy": "deterministic", "code": "en"}. |
| 200 | template name (…) does not exist in <language> | The template is approved in a different language than the one requested. | Use the exact language code the template was approved in (for example es_MX is not the same as es). Check it in GET /templates. |
| 200 | Message was not sent: provide chatId, phone, bsuid, or username | No recipient the channel could resolve. | Pass exactly one recipient: phone (country code plus number, digits only), chatId (for example [email protected]) or bsuid. |
Common questions
Related
OTP Verification
New device login OTP via WhatsApp API
The scenario sends the user a WhatsApp authentication template with a one-time verification code when a login attempt is flagged as coming from a new device.
OTP Verification
New sign-in confirmation code via WhatsApp API
Sends a one-time login confirmation code through a WhatsApp authentication template when your backend detects a sign-in from a new device, browser, or location.
OTP Verification
Two-factor authentication (2FA) via WhatsApp API
The scenario sends a WhatsApp authentication template with a one-time verification code when two-factor authentication is required after primary login.
OTP Verification
Phone number verification code via WhatsApp API
Delivers a one-time code via WhatsApp authentication template when the user adds or changes a phone number.
OTP Verification
Password reset OTP via WhatsApp API
Sends a one-time recovery code through a WhatsApp authentication template when the user starts password reset.
OTP Verification
WhatsApp OTP verification API: send a code
The scenario sends the user a WhatsApp authentication template with a one-time verification code in the message body and a copy-code button.
OTP Verification
Resend OTP via WhatsApp API
Resends a new one-time verification code via WhatsApp authentication template when the user taps “Resend code”.
OTP Verification
Registration OTP via WhatsApp API (copy code)
Sends a WhatsApp authentication template with a one-time registration code in the body and a copy-code button.


