top of page
Search

Hibot Authentication Template Previews in WhatsApp Business API



Before creating or sending authentication templates, it is important to preview how the message will appear in different languages.

With Hibot WhatsApp Business API, you can use the message_template_previews endpoint to generate authentication template previews instantly.

This preview feature helps you:

  • View OTP message text in different languages

  • Preview security recommendation text

  • Preview code expiration warning

  • Check Copy Code and Autofill button labels

  • Verify localization before creating templates


What Is the Message Template Preview Endpoint?


The preview endpoint is:

GET /<WHATSAPP_BUSINESS_ACCOUNT_ID>/message_template_previews

It returns sample authentication message text based on the settings you choose.

You can preview:

  • English OTP messages

  • Spanish OTP messages

  • French OTP messages

  • Any supported WhatsApp language

This is useful before creating templates with Hibot WhatsApp Business API.


Why Use Authentication Template Previews?


Businesses often send OTP and verification codes in multiple languages.

Instead of creating a template first and checking later, you can preview the exact body, footer, and button text before submission.

Benefits include:

  • Faster localization testing

  • Better multilingual support

  • Reduced template errors

  • Easier approval process

  • More consistent OTP messaging


Request Syntax

GET /<WHATSAPP_BUSINESS_ACCOUNT_ID>/message_template_previews
  ?category=AUTHENTICATION
  &languages=en_US,es_ES
  &add_security_recommendation=true
  &code_expiration_minutes=10
  &button_types=OTP

Supported Request Parameters

category


Required.

For authentication templates, this must always be:

AUTHENTICATION

languages


Optional.

A comma-separated list of language and locale codes.

Example:

en_US,es_ES,fr

If you do not provide this parameter, Hibot returns previews for all supported languages.

Examples:

  • en_US = English (United States)

  • es_ES = Spanish (Spain)

  • fr = French

  • hi = Hindi

  • ar = Arabic


add_security_recommendation


Optional.

Set this to true if you want the security recommendation to appear in the message body.

Example:

add_security_recommendation=true

When enabled, the preview includes a warning such as:

For your security, do not share this code.

code_expiration_minutes


Optional.

Set this to a number between 1 and 90.

Example:

code_expiration_minutes=10

This adds an expiration warning in the footer.

Example:

This code expires in 10 minutes.

button_types


Required.

For authentication templates, this value must always be:

OTP

When included, the response returns localized button text such as:

  • Copy Code

  • Autofill

  • Autocompletar

  • Copier le code

Example API Request

curl 'https://graph.facebook.com/v25.0/WHATSAPP_BUSINESS_ACCOUNT_ID/message_template_previews?category=AUTHENTICATION&languages=en_US,es_ES&add_security_recommendation=true&code_expiration_minutes=10&button_types=OTP' \
-H 'Authorization: Bearer ACCESS_TOKEN'

This request asks Hibot to generate:

  • English preview

  • Spanish preview

  • Security recommendation

  • 10-minute expiration footer

  • OTP button labels


Example Preview Response

{
  "data": [
    {
      "body": "*{{1}}* is your verification code. For your security, do not share this code.",
      "buttons": [
        {
          "autofill_text": "Autofill",
          "text": "Copy code"
        }
      ],
      "footer": "This code expires in 10 minutes.",
      "language": "en_US"
    },
    {
      "body": "Tu código de verificación es *{{1}}*. Por tu seguridad, no lo compartas.",
      "buttons": [
        {
          "autofill_text": "Autocompletar",
          "text": "Copiar código"
        }
      ],
      "footer": "Este código caduca en 10 minutos.",
      "language": "es_ES"
    }
  ]
}

Understanding the Response

Each language preview contains:

  • body = OTP message body

  • buttons = localized button text

  • footer = expiration warning

  • language = language code returned

Example:

*{{1}}* is your verification code.

The {{1}} placeholder represents the OTP value that will be inserted when the message is sent.

Example English Preview

Body:
*{{1}}* is your verification code. For your security, do not share this code.

Button:
Copy code

Autofill Button:
Autofill

Footer:
This code expires in 10 minutes.

Example Spanish Preview

Body:
Tu código de verificación es *{{1}}*. Por tu seguridad, no lo compartas.

Button:
Copiar código

Autofill Button:
Autocompletar

Footer:
Este código caduca en 10 minutos.

Previewing Different Authentication Styles


The preview endpoint supports all authentication template types.

You can preview text for:

  • Copy Code templates

  • One-Tap Autofill templates

  • Zero-Tap templates

The button labels may change depending on the authentication style.

Examples:

  • Copy Code

  • Autofill

  • Automatically Verify


Preview Without Security Recommendation


If you do not want the security recommendation, simply remove:

add_security_recommendation=true

Then the preview body becomes:

*{{1}}* is your verification code.

Preview Without Expiration Warning


If you do not want an expiration footer, remove:

code_expiration_minutes=10

Then the footer will not appear in the preview response.


Supported Expiration Values


The expiration value must be:

  • Minimum: 1 minute

  • Maximum: 90 minutes

Common recommendations:

  • Login OTP: 5 minutes

  • Password Reset OTP: 10 minutes

  • Payment Verification OTP: 3 minutes


Best Practices for Authentication Template Previews


To get the best results:

  • Always preview every language before creating the template

  • Verify that the security warning is translated correctly

  • Check the expiration footer in each language

  • Confirm the Copy Code and Autofill button labels

  • Use the same expiration time across all languages

  • Test important languages like English, Spanish, Arabic, Hindi, and French


Common Mistakes to Avoid


Avoid these common issues:

  • Using language instead of languages

  • Forgetting button_types=OTP

  • Using an expiration time greater than 90 minutes

  • Forgetting to enable the security recommendation

  • Not checking localization before template approval

Incorrect:

&language=en_US

Correct:

&languages=en_US,es_ES

Why Businesses Use Hibot Template Previews


Businesses use Hibot template previews because they:

  • Save time during template creation

  • Improve multilingual support

  • Reduce approval delays

  • Help teams verify message formatting

  • Ensure OTP messages are consistent globally

This is especially useful for:

  • E-commerce apps

  • SaaS products

  • Banking and fintech companies

  • International login systems

  • Apps with multilingual users


Final Thoughts


The message_template_previews endpoint is the easiest way to preview WhatsApp authentication templates before creating them.

With Hibot WhatsApp Business API, you can instantly check:

  • OTP message text

  • Localized button labels

  • Security recommendation strings

  • Expiration footer strings

  • Multiple languages in one request

By previewing templates first, you can avoid mistakes, speed up approvals, and deliver a better user experience.

 
 
 

Recent Posts

See All
WhatsApp Template Messages with Hibot API

WhatsApp Template Messages allow businesses to send pre-approved messages to customers even outside the standard 24-hour customer service window. With Hibot’s WhatsApp Official API, template messages

 
 
 
WhatsApp Sticker Messages with Hibot API

WhatsApp Sticker Messages allow businesses to send animated or static stickers directly to customers on WhatsApp. With Hibot’s WhatsApp Official API, you can use stickers to make conversations more en

 
 
 

Comments


bottom of page