All guidesTutorial · Messaging
Two-factor auth with Verify
Send one-time passcodes by SMS, voice or WhatsApp and check them, without storing codes yourself.
8 min- 1
Send a code
Start a verification for the user’s phone number.
await client.verify.start({ to: '+14155550123', channel: 'sms' }); - 2
Check the code
When the user types the code, check it. Covebyte handles expiry and retries.
const { valid } = await client.verify.check({ to: '+14155550123', code: '482913' }); - 3
Add a fallback
If SMS doesn’t arrive, offer a voice call or WhatsApp with the same API.
- ✓
You’re done
Need help taking this to production? Our engineers can review your setup.