Overview
This guide shows how to send authentication templates to any destination WhatsApp numbers. Authentication templates are critical to fulfill your 2FA or OTP authentication use case. You can start sending authentication templates using our APIs. Follow the instructions below.Prerequisites
To get started, you need a Plivo account — sign up with your work email address if you don’t have one already. If this is your first time using Plivo APIs, follow our instructions to set up a Ruby development environment. Once you have a Plivo account, follow our WhatsApp guide to onboard your WhatsApp account, register a number against your WABA and have a template in an approved state. If your phone number is in connected state and your authentication template is in approved state, you can send your first message.Create Send WhatsApp application
Create a file called WhatsappAuthenticationMessagheCreate.rb and paste into it this code.Test
Save the file and run it.Note: If you’re using a Plivo Trial account, you can send messages only to phone numbers that have been verified with Plivo. You can verify (sandbox) a number by going to the console’s Phone Numbers > Sandbox Numbers page.