Authentication Templates

Authentication templates allow businesses to authenticate users using one-time passcodes (usually four to eight digit alphanumeric codes) to potentially complete multiple steps of the login process. For example, account verification, account recovery, and integrity challenges.

You must use an authentication template if you want your mobile app to allow users to receive a one-time password or verification code via WhatsApp.

📘

Note:

  • Authentication templates are not supported in the India region by Meta. If a customer in the India region still uses Kaleyra's WhatsApp Template API to create authentication templates, then Meta may reject the request.

For a template to be classified as authentication, a business must:

  • Use WhatsApp’s preset authentication message templates, which include optional add-ons like security disclaimers and expiry warnings.
  • Configure a one-time password button (copy-code)
  • Follow content restrictions: URLs, media, and emojis are not allowed for authentication template content or parameters. Also, Additional length restrictions of 15 characters are applied to parameters.
DefinitionExamples
Authentication code"{{1}} is your verification code".
"{{1}} is your verification code. For your security, do not share this code".
"{{1}} is your verification code. This code expires in 15 minutes".

Copy Code Authentication Template

The Copy Code Authentication Template allows you to send a one-time password or code along with a Copy Code button.

When a WhatsApp user taps the Copy Code button, the WhatsApp client copies the password or code to the device's clipboard. Users can access the app and paste a password or code into the app's interface.

The Copy code button authentication template consists of:

  • Code and preset text: <VERIFICATION_CODE> is the verification code.
  • An optional security disclaimer: example "For security, do not share this code".
  • An optional expiration warning: example "This code expires in <NUM_MINUTES> minutes". The code_expiration_minutes value can be a maximum of 90 minutes and a minimum of 1 minute.
  • A copy code button.

📘

Note:

The URLs, media, and emojis are not supported.