Verification via WhatsApp

Using WhatsApp to deliver a one-time password (OTP) to assist with user authentication.

Send OTP messages via WhatsApp to their device. This experience is similar to receiving SMS OTP, and even on Android phones, the OTP code can be retrieved directly from the English WhatsApp message, allowing users to receive the code without leaving the application.

Benefits of WhatsApp Verification

As a verification channel, it has the same advantages as SMS and is not affected by local carrier infrastructure. This means WhatsApp messages can be received in areas where there is Wi-Fi but weak or no cellular signal (such as remote areas or on airplanes). WhatsApp is usually faster than SMS and is end-to-end encrypted, providing additional security.

WhatsApp also offers more security advantages: Each WhatsApp user can be identified by the unique phone number provided when creating an account. WhatsApp uses its own set of robust anti-fraud tools to verify these phone numbers. This means you outsource part of the authentication work to WhatsApp.

In many countries, WhatsApp is cheaper than SMS and can help you save money without charging for unsent messages. In India, Indonesia, and South America, we recommend using WhatsApp as the preferred verification channel because it can improve your overall verification conversion rate and is cheaper.

Now use Expediusly verification instead of building it from scratch, start sending OTP immediately, with no message quantity or industry restrictions, and send through pre-approved WhatsApp shared phone numbers.

Setting Up WhatsApp Verification

  1. Use the send verification code API, with the channel specified as WhatsApp.

  2. Verify the verification like any other channel. Reference API

WhatsApp Verification Pricing

The cost of sending messages varies by country where the verification message is sent, and there are no additional fees. WhatsApp only charges for successful messages, and you do not pay for failed or undelivered messages.

💰️ See WhatsApp Pricing for more details (link).

Best Practices for Implementing WhatsApp OTP

User Interface Design

Using WhatsApp to send OTP is a new approach, and we provide some UI design suggestions:

table

image

OTP is sent via WhatsApp by default. If it fails, it is resent via SMS immediately.

image

Check if the User Has WhatsApp Installed

To improve user experience and default to using WhatsApp, you can determine if the user has the WhatsApp app installed on the same device running your application. Here is an implementation example for WhatsApp detection on Android:

fun PackageManager.isPackageInstalled(packageName: String): Boolean {
  return try {
    getPackageInfo(packageName, PackageManager.GET_ACTIVITIES)
    true
  } catch (e: NameNotFoundException) {
    false
  }
}

fun isWhatsAppInstalled : Boolean() {
    val whatsAppPackageName = "com.whatsapp"
    val whatsAppBusinessPackageName = "com.whatsapp.w4b"
    return getPackageManager().isPackageInstalled(whatsAppPackageName) || getPackageManager().isPackageInstalled(whatsAppBusinessPackageName)
}

Q&A