WhatsApp OTP Verification API

As you know Fast2SMS has introduced its new feature Smart OTP, in which OTP messages are sent via a dedicated route to ensure faster delivery. In the earlier article, we have discussed about the process of sending OTP with Whatsapp as fallback medium and SMS as the primary mode. In this post, we will guide you to send Smart OTP messages with SMS as fallback and Whatsapp as Primary source. So, let’s continue reading!

 

Click here to send multi channel OTP with Whatsapp as fallback

 

bulk-SMS-service-signup

 

 

Whatsapp OTP sending process with SMS as fallback

1.  Login to your Fast2SMS account and select Smart OTP on the Apps dashboard. The following screen will appear. Make sure you have completed the previous steps of Linking your WhatsApp Business account in WhatsApp Manager and connecting your Whatsapp business number with it. Also, make sure you have gotten approval of authentication or utility template. Once all the steps are done, click on the ‘Add OTP Template’ tab.

Fast2SMS panel: Smart OTP page before any template exists: onboarding steps for SMS OTP and WhatsApp OTP, Add OTP Template button

 

2. Once you click on the tab, the following pop-up box will appear as shown below. Here, we have selected Whatsapp as our primary channel. Click on the Select Whatsapp Business Number drop down menu, your Whatsapp Business number will be displayed that you have added into your Fast2SMS account.

Fast2SMS panel: WhatsApp Channel tab: number chosen, template dropdown (Authentication/Utility only)

 

3. Next, you need to select the Whatsapp Template, authentication or utility that you have added in Fast2SMS account. Your content preview will be visible on the OTP Content Preview field. In the next field ‘Select OTP Variable for sending OTP’, you need to choose where your OTP will be shown; in Variable 1, Variable 2, Variable 3, Variable 4 or Variable 5.

Fast2SMS panel: WhatsApp Channel tab filled with login_otp template and OTP variable

 

4. Click on the checkbox ‘Set Fallback Template’. After that select Fallback Entity, Fallback Sender ID and the fallback Template from the drop down menu. After selecting the Variable, click on the tab ‘Assign OTP Template‘.

Fast2SMS panel: WhatsApp OTP with SMS fallback: fallback entity, sender, DLT template and variable

 

5. Once you click on the tab  ‘Assign OTP Template‘, your OTP template is saved. To test it, click ‘Test OTP’ on the template, enter mobile number and then select ‘Send Test OTP’.

Fast2SMS panel: Test OTP modal with OTP ID and a 10-digit mobile number

 

6. The following screen will appear.

Fast2SMS panel: Test OTP after Send: "Message sent. Checking DLR..." state

 

7. If the delivery report does not arrive within 30 seconds, the window shows “Delivery report pending”, as in the image below. The message is still sent, and you can check its status later in OTP Logs. When the report arrives in time, you see “Delivered successfully”.

Test OTP window showing Delivery report pending with a link to OTP Logs

 

Note: If you are using SMS as your primary channel, price as per your DLT Bulk SMS plan will be deducted. Else, if you are using Whatsapp as your primary channel, price of INR 0.25 (25 paise) will be deducted at the time of writing. See the current rates on our SMS pricing page and WhatsApp pricing page.

In the case of WhatsApp, if a message fails to deliver, the corresponding charge will be refunded as per the applicable policy. However, for SMS sent through DLT, charges are deducted on a submission basis and are not refundable.

Sending in bulk? For high OTP volumes our team offers discounted rates. Talk to our team or see OTP pricing.


 

 

Hope you have a clear understanding on how to send multi channel OTP messages with SMS as fallback and Whatsapp as Primary medium. Start exploring our Smart OTP feature to ensure smooth and hassle-free delivery without any interruption. Signup with Fast2SMS and take your communication journey to another level! Call or Whatsapp us at 6262778822 for more details. Visit fast2sms.com today!

Frequently asked questions

When does Smart OTP send the SMS fallback?

The fallback goes out only when the WhatsApp OTP fails, and only within 120 seconds of the first send. The same OTP value is sent by SMS, so the user can enter the code from whichever message they get.

Is the SMS fallback charged separately?

Yes. The fallback SMS is charged like a normal SMS on your DLT plan, and DLT SMS charges are not refunded. If your wallet balance is too low, the fallback is skipped, so keep enough balance for both channels.

Do I need DLT approval for the SMS fallback?

Yes. The SMS fallback uses your DLT entity, sender ID and an approved OTP content template, so all three must be ready before you set it up. Read the DLT OTP template rules.

Which WhatsApp template should I use for OTPs?

Use an approved authentication template, which Meta makes for one-time codes and which can carry a copy-code button. In Smart OTP you then choose which variable holds the OTP. See how to set up a WhatsApp OTP template.

Can Fast2SMS verify the OTP for me?

Yes. Smart OTP has Send OTP, Resend OTP and Verify OTP APIs, so Fast2SMS creates the code and checks what the user enters. Your app does not need to store the code. Read the Smart OTP verify API guide.

Are failed WhatsApp OTPs refunded?

Yes. Failed Smart OTP WhatsApp messages are refunded to your wallet automatically, under the same rules as other WhatsApp messages. The refund shows in Transaction History as Failed Smart OTP WhatsApp Refund.