Skip to content
Akedly
WhatsAppNEW

OTP templates

Send WhatsApp OTPs in wording you pick from Meta's authentication library, from your own WhatsApp Business Account. Add a template once in the dashboard, wait for Meta to approve it, then pass its id — or make it an integration's default. With neither, nothing changes: the Built-in default keeps sending.


How it works

  1. Pick an entry from the library (Browse the library) and choose English, Arabic, or both.
  2. Add it. Akedly creates it on your WABA and Meta reviews each language, usually within minutes.
  3. Wait for Approved in the OTP language. Akedly emails you when Meta decides.
  4. Use it: pass template: { id } on Headless or Gateway, or make it an integration's default so requests need no change.

A template changes only the wording of a WhatsApp OTP sent from your own number. It does not choose the channel: routing is unchanged, and SMS, Telegram and email keep their usual wording.

You choose

  • The library entry and its languages.
  • The security sentence, when the entry does not already include one.
  • Stored defaults for each non-fixed variable, per language.
  • Per-request variable values.
  • A default template per integration.

Fixed

  • Meta's wording and variable slots.
  • The Copy code button and the three-minute expiry footer.
  • The language: otpLanguage when supplied, otherwise the integration's Language (Channels tab, Code message card).
  • 15 characters per variable value.

Add a template

  1. Open OTP & MFA → OTP templates(opens the dashboard in a new tab) and select Browse the library under the list. The drawer opens on Choose a template: search the library, pick an entry, and read each language with the English / Arabic preview tabs. Entries marked English only have no Arabic version; entries you already hold show Added.
  2. Select Continue. On Set up template name, tick the Languages you want.
  3. Turn Add a safety line on or off (“For your security, do not share this code.”) when the entry does not already include one.
  4. Optionally store a default for each variable, per language, up to 15 characters each; fixed values such as validity are filled for you.
  5. Select Add template. The drawer confirms Sent to WhatsApp for review, and each language starts In review.

Stored defaults decide how short your requests can be:

  • A variable with a stored default can be left out of a request; a request value overrides it.
  • A variable without one must be sent on every request, and the template cannot be an integration default for that language.
  • Edit defaults changes future sends without another Meta review. Adding a language starts one.

Two limits apply to adding and editing:

  • Each WhatsApp Business Account holds up to 20 templates. Removed templates don't count. At 20, adding another is refused with TEMPLATE_LIMIT_REACHED; remove one first.
  • You can't hold two identical templates: same library entry, languages, security recommendation and stored defaults. Adding one, or an edit that would make two identical, is refused with TEMPLATE_DUPLICATE, which names the template you already have. If an earlier add failed at Meta, open that template and select Try again on its language wasn't created on WhatsApp notice instead of adding it again. Templates that differ only in their stored defaults are allowed.

Viewing needs whatsapp:read. Adding, editing, removing and setting an integration default need whatsapp:update; without it those actions stay greyed out and say why.

Track approval

The OTP templates list shows each template with one status and its languages. Select a row (or View in its … menu) to open it: the drawer shows each language's status, the Template ID to send, the WhatsApp name, the stored defaults, a preview, and a ready-made request body under Use it in your request (pick Headless, Gateway or Legacy). While anything is in review the page refreshes the status every 30 seconds, and Akedly emails you when a language is approved or rejected.

StatusMeaningWhat to do
In reviewMeta is reviewing this language.Wait. Requests in this language are refused with TEMPLATE_NOT_APPROVED.
ApprovedReady in this language.Copy the Template ID.
RejectedMeta refused this language. The rejection email includes Meta's reason when Meta gives one.The wording can't be edited: remove the template and add it again. The template's notice links to Review in WhatsApp Manager.
Paused / Turned offWhatsApp paused this language after poor ratings, or turned it off after repeated low ratings. Codes can't use it while it is not approved.A pause lifts on its own once ratings improve. Review a turned-off template in WhatsApp Manager.
Not createdAkedly saved the template but Meta did not create this language.Open the template and select Try again. If Meta refuses the name, remove and add it again.
Old accountThe template was made on a WABA you replaced. It overrides every language status.Remove it and add it again (see Remove and re-add).

Approval is per language: an approved English variant does not make the template usable for an OTP requested in Arabic. The WhatsApp name (akedly_auth_…) is for reference only; requests use the Template ID. The read-only Built-in message row at the top needs no ID: it is used when neither the request nor the integration names a template.

Send with a template

  • Name
    template
    Type
    object
    Description

    { id, variables } only. Any other key, including language, is refused with TEMPLATE_VARIABLE_INVALID. Use top-level otpLanguage to choose the OTP language. template: null means the same as leaving it out.

  • Name
    template.id
    Type
    string
    Description

    The Template ID from OTP & MFA → OTP templates (open the template to copy it).

  • Name
    template.variables
    Type
    object
    Description

    Curated variable names mapped to values. Required only for variables with no stored default in the OTP language.

Choose the template on your server. Never forward a template object from a browser or app. On Gateway the request signature does not cover template.

Variables

  • Values are non-empty strings of 15 characters or fewer. Arabic letters count one each.
  • No line breaks, tabs, or four spaces in a row.
  • Use only the entry's curated names (Library reference).
  • Leave out fixed variables. If you send one, it must equal its fixed value: validity in verify_code is 3 minutes or ٣ دقائق.

Commercial International Bank (29 characters) and 1,250,000.00 EGP (16) are both too long; use a shorter value.

Choose the OTP language

Top-level otpLanguage picks the English or Arabic variant for one request. When absent or null, the integration's Language (Channels → Code message) picks it. template.language is refused; use otpLanguage.

Set an integration default

When a transaction or attempt is created, Akedly uses the first of:

  1. The template in the request.
  2. The integration's default OTP template, with its stored defaults.
  3. The Built-in default.

A custom template, explicit or integration default, must be Approved in the OTP language. Otherwise creation returns HTTP 400 — TEMPLATE_NOT_APPROVED, or TEMPLATE_REJECTED if that language was rejected — never a fallback. See template errors.

To change a default's variables for one request, send that template explicitly.

In Integrations, open the integration and go to its Channels tab. In the Code message card, choose a template under Template, then select Save on the card. Default code message is the Built-in default. Only templates Approved in the card's Language, with a stored default for every non-fixed variable, can be chosen; the others are greyed out with the reason, such as In review for English or Missing defaults: purpose. If the card shows Couldn't load your templates., select Try again.

The Template row appears only if your role can see WhatsApp templates, and changing it needs whatsapp:update. If WhatsApp is not connected, the card offers Connect WhatsApp instead of your own templates.

A custom default needs WhatsApp in the integration's delivery order; otherwise the save is refused with TEMPLATE_PIPELINE_REQUIRES_WHATSAPP, shown on the card as Add WhatsApp to your delivery order to use your own template. Default code message can always be saved.

Add a missing language from an integration

If you switch the Language in an integration's Code message card to a language its template doesn't have yet, the card says so (for example “verify_code” has no Arabic version yet.) and offers Add Arabic (or Add English).

  1. Select Add Arabic. The Add Arabic drawer opens, with a field for each variable you set and a preview of the WhatsApp message. Your change to the card stays unsaved.
  2. Fill in the Arabic values (up to 15 characters each) and select Send for review. The drawer confirms Sent to WhatsApp for review.
  3. When Meta approves Arabic (usually within minutes; Akedly emails you), select Save on the Code message card. Until then the card can't be saved with this template in Arabic; choose Default code message if you need to save now.

The action appears only after the template library loads, when the template's library entry has that language but it was never added to your template, you have whatsapp:update, and the template belongs to your current WABA. A language that is In review, Rejected or Not created on Meta shows the reason instead, and is fixed from OTP templates.

When a template cannot be used

Refused before anything is sent

StatusCodeCauseWhat to do
400TEMPLATE_UNKNOWNThe id is malformed, not found, or does not belong to your account.Copy the Template id from My templates.
400TEMPLATE_ARCHIVEDThe template was removed.Add it again; the new copy has a new id.
400TEMPLATE_WABA_REQUIREDYour own WABA is not active, or its token cannot be read.Connect or repair the WABA.
400TEMPLATE_WABA_CHANGEDThe template was created on a previous WABA.Remove it and add it again.
400TEMPLATE_NOT_APPROVEDNo approved variant exists for the OTP language, or Meta is still reviewing it.Wait for Approved. If it is Missing on Meta, retry Meta setup or remove and re-add the template, then add the OTP language if needed.
400TEMPLATE_REJECTEDMeta rejected the variant for the OTP language.Remove it and add it again.
400TEMPLATE_VARIABLE_MISSINGA required variable has no request value and no stored default.Pass the variable or store a default.
400TEMPLATE_VARIABLE_INVALIDThe variable name or value is invalid, a fixed value changed, or the object contains language or another unsupported key.Read details and correct the request.

Fallback at send time

This is rare, because approval is checked at creation. If the approved variant becomes unusable or Meta refuses it during sending, Akedly sends the Built-in default once, in the same language, on your WABA. The fallback is logged and Akedly's operations team is alerted. The API response you already received still shows the original data.template. If that send also fails, normal WhatsApp recovery continues with the Built-in default, which can use Akedly's shared number.

Shared senders always send the Built-in default

Custom wording is only sent from your own WABA's phone number. For an account with an active own WABA, if routing sends the OTP through Akedly's shared number or a send falls back to it, the selection is still checked and echoed but the message uses the Built-in default. Without an active own WABA, selecting a custom template is refused with TEMPLATE_WABA_REQUIRED (see above). On a legacy manually assigned shared phone, the Built-in default is also sent in English, whatever the OTP language.

Remove and re-add

Remove (in the row's … menu, or Remove template in the open template's menu) archives the template in Akedly at once: its Template ID stops working (TEMPLATE_ARCHIVED), and every integration using it as a default goes back to the Built-in default. Akedly attempts deletion on Meta only when the template still belongs to your active WABA. If it belongs to a replaced WABA, Akedly archives it locally without calling Meta. If Meta refuses an attempted deletion, delete it in WhatsApp Business Manager. Meta blocks the name for about 30 days, so adding the same entry again creates a new WhatsApp name and a new Template ID — update your integration.

After you change WhatsApp Business Account

If you reconnect a different WABA through Embedded Signup, every template from the old one shows Old account in the list (and Re-add after WhatsApp change in an integration's Template choice), and requests or integration defaults that use it are refused with TEMPLATE_WABA_CHANGED. Remove it and add it again. If you disconnect without reconnecting, they are refused with TEMPLATE_WABA_REQUIRED, the OTP templates tab shows Connect WhatsApp first, and an integration's Code message card offers Connect WhatsApp in place of your own templates; choose Default code message there to save without one. A transaction created before the change sends the Built-in default in its selected language.

Library reference

Every entry below can be added from the library (Browse the library). The code slot is where Meta places the OTP; you never pass it. Types are Meta's descriptions, not format checks.

EntryCode slotVariable name and typeLanguages
delivery_code_11Noneen, ar
delivery_code_26customerName TEXT, orderInfo TEXT, estimatedDeliveryDate DATE, deliveryStartTime DATE, deliveryEndTime DATEen, ar
delivery_code_32arrivalDate DATEen, ar
delivery_code_41Noneen, ar
delivery_code_53itemCount NUMBER, orderId TEXTen, ar
delivery_code_63orderId TEXT, deliveryDate DATEen, ar
in_person_banking_user_verification1Noneen, ar
login_code1Noneen
verify_account4action TEXT, accountName TEXT, linkedService TEXT, securityContact TEXTen
verify_account_24action TEXT, accountName TEXT, linkedService TEXTen, ar
verify_code1purpose TEXT, validity TEXT, supportPhone PHONE_NUMBERen, ar
verify_code_11Noneen, ar
verify_otp_usecase1purpose TEXTen, ar
verify_password_recovery1Noneen, ar
verify_transaction_11Noneen, ar
verify_transaction_21amount AMOUNTen, ar
verify_transaction_31amount AMOUNT, cardNumber CARD_NUMBERen, ar
verify_transaction_41amount AMOUNT, accountNumber NUMBERen, ar
verify_transfer_11amount AMOUNTen, ar

validity in verify_code is fixed. verify_otp_usecase already includes its security sentence, so the security option adds nothing to it.

Localized parts

LanguageSecurity sentenceExpiry footerButton
enFor your security, do not share this code.Expires in 3 minutes.Copy code
arلأسباب تتعلق بأمانك، يرجى عدم مشاركة هذا الرمز.تنتهي صلاحيتها خلال ‏٣‏ دقائق.نسخ الرمز

For verify_otp_usecase, the Arabic sentence already in the body is للحفاظ على أمانك، لا تشارك هذا الرمز.