Skip to content
๐Ÿ” WhatsApp OTP for SaaS

Add WhatsApp as an OTP option
verification in your SaaS app

Use the documented API to request and verify WhatsApp OTPs. Delivery, provider requirements, and charges depend on your setup and destination.

REST APIOTP request and verificationAPI key requiredConnected WhatsApp Business Account

Use the documented OTP API

Option A โ€” OTPless (no code entry)
import { createClient } from
  '@emacrontechnologies/outreachagent';

const oa = createClient(
  process.env.OUTREACHAGENT_API_KEY
);

// 1. Init session โ†’ get wa_link
const { session_id, wa_link } =
  await oa.magicLink.init();

// 2. Show wa_link as button:
// <a href={wa_link}>Continue
//    with WhatsApp</a>

// 3. Poll every 3 seconds
const { verified, phone } =
  await oa.magicLink.status(
    session_id
  );
// verified === true โ†’ log in โœ…
Option B โ€” WhatsApp OTP (send code)
const { request_id } =
  await oa.otp.send({
    phone: '+919876543210',
    expiry: 300,
    length: 6,
  });
// OTP delivered via WhatsApp
// (auto-falls back to SMS)
Option B โ€” Verify code
const { verified } =
  await oa.otp.verify(
    request_id,
    userEnteredOtp,
  );

if (verified) {
  // โœ… Log the user in
} else {
  // โŒ Invalid OTP
}
npm install @emacrontechnologies/outreachagent

Compare OTP channel requirements

Delivery conditions

SMSDepend on provider and destination
WhatsAppDepend on provider and destination

Current price

SMSCheck your provider terms
WhatsAppCheck the current pricing page

Setup requirements

SMSCheck your SMS provider
WhatsAppCheck WhatsApp account and template requirements

Review the API and setup requirements

API access and OTP charges depend on the selected package and current pricing terms.