Verification
Verification (Verify v2)
The Verify API handles the entire one‑time‑password (OTP) lifecycle — code generation, multi‑channel delivery, retries, and validation. You never store the code; Twilio does.
Time to first call: ~2 minutes. Don't roll your own OTP — Verify gives you SMS, voice, email, WhatsApp, and TOTP behind two endpoints.
Why Verify (and not Messaging)?
| Messaging API | Verify API | |
|---|---|---|
| Generates the OTP code | You do | Twilio does |
| Stores the code for comparison | You do | Twilio does |
| Handles retries / rate limits | You do | Built‑in |
| Multi‑channel (SMS, voice, email, TOTP) | One channel at a time | All in one API |
| Fraud / abuse protection | None | Built‑in |
Use Verify for OTPs and phone ownership checks. Use Messaging for everything else.
The Verify Building Blocks
Service
A Service is your Verify configuration — friendly name, code length, lookup options. Create one per app/environment.
Verification
Start a verification — Twilio generates a code and delivers it to the recipient on the chosen channel.
Verification Check
Submit the code your user entered. Twilio responds with approved or pending / denied.
Two-Step Flow
Channels Supported
SMS
The default and most common channel. Works everywhere a phone can receive text.
Voice Call
For landlines and accessibility — Twilio reads the code aloud.
Lower cost in markets with high WhatsApp penetration; requires a WhatsApp‑enabled sender.
Useful as a fallback or for accounts without a verified phone.
TOTP
Authenticator‑app codes (Google Authenticator, Authy, 1Password) — no message delivery cost per code.
Push (Silent Device Approval)
Approve sign‑in by tapping a push notification instead of typing a code.
