Sending Code via WhatsApp

By default, when the user enters a phone number, we'll send a verification code using SMS. You can add the option for your users to receive the verification code as a WhatsApp message.

How to Add the WhatsApp Option

PhoneChannels options

In your config, add PhoneChannels attribute.

var config = {
// Add WhatsApp option to send verification code
PhoneChannels: ["SMS", "WHATSAPP"], // default = ["SMS"]
// WhatsApp Button Styling
ButtonWAText: "Continue with",
"Tell your customer that you'll be sending the verification code via WhatsApp",
ButtonWABackgroundColor: "#128C7E",
ButtonWABorderColor: "#075E54",
ButtonWATextColor: "#ffffff",
ButtonWALogoColor: "white",

WhatsApp Opt-In Requirements

WhatsApp requires that your application implement explicit user opt-ins to deliver messages over WhatsApp.

โš ๏ธRead WhatsApp Opt-In Requirementsโ€‹

To do this, we provide the ButtonWATextSubtitle to explicitly inform your users that they will be receiving a verification code via WhatsApp.

The default value for ButtonWATextSubtitle is "If you choose to login with WhatsApp, we will send a WhatsApp message to this number with a verification code"

We make ButtonWATextSubtitle customizable so you can use a language that your customers understand.

Please make sure that your customer is informed that they will be receiving a WhatsApp message, otherwise your application may be suspended.