Step-by-step
Step-by-step guide to create and automate authentication templates like OTPs and login verification codes
1. Go to Manage and Tap on "Template Message"

2. Click "+New" to create a New Template Message

3. Choose "Authentication" under the WhatsApp Template message category
There are various template categories according to the different use cases of WhatsApp Template Messages.
Given the pricing updates coming to WhatsApp API applicable since June 1, 2023, templates in AiSensy will now be classified under Utility, Authentication & Marketing.
Utility - Transaction-focused messages used to confirm/ cancel a transaction or a subscription.
Authentication - OTPs & login code messages are used to authenticate a user.
Marketing - All messages that relate to a business's products & services (except for transactional messages)
Since we wish to send an authentication template message, we'll select Authentication under the Template Category.

4. Under Template Type, select Limited Time Offer message
This defines the type of WhatsApp template message you want to send. The different types are TEXT, IMAGE, LIMITED TIME OFFER, CAROUSEL, LOCATION, VIDEO & FILE.
Since we wish to send an authentication template message, we'll select Text message under the Template Type.

5. Select your Template Language
Choose the language of your WhatsApp template message from all the global languages.
For each template message, you can only pick one language.

6. Name your Authentication Template Message
FORMAT – The template name can only be in lowercase alphanumeric characters and underscores. Special characters and white spaces are not allowed.

7. Add Sample authentication code value
Note: This is just a sample value. This is not the code that will send to your end-users.

7. Add OTP Expiration warning (Optional)
Pick a number between 0 to 90 to inform users about the validity of the OTP. This is an optional step. You can also add a security message informing the user not to share this code with others for their own safety.
We recommend you to add both these steps to enhance the user experience.
Note: Template format or message body for the authentication template message is already configured and cannot be edited. Once you've submitted the message, set up automation to enable it.

8. Under Interactive actions, enter the sample code value in "Copy Code"

9. Submit the Authentication Template message
When you're done setting up the authentication template, press submit to submit the template for approval.

10. Go back to the "Template Message" section and tap Sync Status to check approval status
Templates generally take 15 seconds to 2 minutes to approve.
Note: max time of template approval can be 24 hrs.
There you go!! You are all set to setup the automation for this authentication template message. For this, you'll need to create an API campaign and connect the cURL to your backend URL.
