API Catalog 2FA / OTP APIs

2FA / OTP APIs

Two-factor authentication and one-time passwords

Secure your applications with multi-channel OTP delivery. SMS, Email, Voice, WhatsApp, and TOTP support for comprehensive two-factor authentication.

SMS OTP

Popular

Send one-time passwords via SMS. Automatic code generation, expiry, and verification.

POST /api/v1/otp/send
{ "phone": "+15551234567",
  "template": "Your code is {code}",
  "expires_in": 300 }

// Response
{ "otp_id": "otp_abc123",
  "expires_at": "2024-01-19T12:05:00Z" }
Auto-Generate Expiry Control Rate Limiting

Email OTP

Send verification codes via email. Branded templates with your company logo and colors.

POST /api/v1/otp/email
{ "email": "user@example.com",
  "subject": "Verify your account",
  "brand": "MyApp" }

// Response
{ "otp_id": "otp_def456" }
Branded Templates Custom Subject Resend Logic

Verify OTP

Verify submitted OTP codes. Automatic expiry checking and attempt limiting.

POST /api/v1/otp/verify
{ "otp_id": "otp_abc123",
  "code": "123456" }

// Response
{ "valid": true,
  "verified_at": "2024-01-19T12:03:00Z" }
Attempt Limits Expiry Check One-Time Use

TOTP (Authenticator Apps)

Generate TOTP secrets for Google Authenticator, Authy, and other authenticator apps.

POST /api/v1/totp/generate
{ "user_id": "user_123",
  "issuer": "MyApp" }

// Response
{ "secret": "JBSWY3DPEHPK3PXP",
  "qr_code": "data:image/png;base64,..." }
QR Code Backup Codes RFC 6238

Voice OTP

Deliver OTP codes via automated phone call. Ideal for users without SMS or as fallback.

POST /api/v1/otp/voice
{ "phone": "+15551234567",
  "language": "en-US",
  "repeat": 2 }

// Response
{ "call_id": "call_abc123",
  "status": "initiated" }
Multi-Language Retry Logic Call Recording

WhatsApp OTP

Send OTP via WhatsApp. Higher delivery rates in regions with low SMS reliability.

POST /api/v1/otp/whatsapp
{ "phone": "+15551234567",
  "template": "otp_verification" }

// Response
{ "message_id": "wa_abc123",
  "status": "sent" }
High Delivery Read Receipts Templates

Ready to add 2FA to your app?

Get your API key and start securing users in minutes.