Add two-factor authentication to your app in minutes. Send verification codes via SMS, email, and WhatsApp. Simple REST API, no complex setup, enterprise-grade security.
Protect your users and your business
2FA stops 99% of automated attacks. Even if passwords are compromised, attackers can't access accounts without the second factor verification code.
Many industries require multi-factor authentication. Stay compliant with PCI-DSS, HIPAA, SOC 2, and other security standards with 2FA.
Users expect 2FA from modern applications. Show your commitment to security and gain user confidence with two-factor authentication.
Prevent unauthorized transactions and account fraud. 2FA dramatically reduces fraud-related losses and customer support costs.
Everything you need for secure authentication
Send verification codes via SMS to any phone number worldwide. Universal compatibility with all mobile carriers and devices.
Cost-effective 2FA via email. Perfect for applications where users prefer email verification or as a fallback option.
Higher open rates with WhatsApp verification. Official Meta Business API integration with rich media support.
Automatic failover between channels. Try SMS first, fallback to email or WhatsApp if delivery fails.
Configurable expiration times for verification codes. Balance security and user experience with customizable timeouts.
Built-in protection against brute force attacks. Configurable rate limits and retry logic to prevent abuse.
Add two-factor authentication in just a few lines of code
// Send 2FA code
const response = await fetch('https://api.sendmator.com/v1/otp/generate', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
identifier: '+1234567890', // or email
channel: 'sms', // or 'email', 'whatsapp'
fallback_channels: ['email', 'whatsapp'], // Auto-fallback
expiry_seconds: 300 // 5 minute expiration
})
});
const { session_id } = await response.json();
// Store session_id and show verification form to user
// Verify 2FA code
const verify = await fetch('https://api.sendmator.com/v1/otp/verify', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
session_id: session_id,
code: userEnteredCode
})
});
const { verified } = await verify.json();
if (verified) {
// Grant access - user passed 2FA
console.log('2FA verification successful!');
} else {
// Deny access - invalid code
console.log('Invalid verification code');
}
Protect critical user actions
Require 2FA on every login or for logins from new devices. Prevent unauthorized access even when passwords are stolen.
Verify high-value transactions with 2FA codes. Essential for payment processors, banking apps, and e-commerce platforms.
Protect sensitive account modifications. Require 2FA before password changes, email updates, or security setting changes.
Add 2FA to healthcare records, legal documents, or any sensitive information requiring extra protection and compliance.
Free credits included. Add two-factor authentication to your app today.