Verify phone numbers and secure logins with one-time codes delivered via SMS, WhatsApp, or email. Built-in expiry, retry limiting, and fraud protection.
Send OTP codes via SMS, WhatsApp, or email. Automatically fall back to the next channel if delivery fails.
Rate limiting per phone number, max attempt enforcement, and code expiry — all handled by the API so you don't have to.
Choose 4–8 digit codes with custom TTL from 1–30 minutes. Set max verification attempts per session.
Each OTP session has a session token. Safely retry the verify endpoint without risk of double-verification.
const session = await client.verify.send({
to: '+14155552671',
channel: 'sms', // 'sms' | 'whatsapp' | 'email'
codeLength: 6,
expiresIn: 300, // seconds
})
// User submits code
const result = await client.verify.check({
sessionToken: session.sessionToken,
code: userInput,
})
if (result.valid) {
// Phone number verified ✓
}