Use cases
What is Octotp?
Octotp is an API for one-time verification codes. You generate a code, send it to your user, and validate it when they enter it. Use it for any flow where you need to verify a user with a short-lived code.
Use cases
Email verification
Verify that a user owns the email address they signed up with.
- User enters their email.
- Your backend calls Octotp to create a token for that email.
- You send the code to the user (via your email service).
- User enters the code in your app.
- Your backend validates the code with Octotp.
- Mark the email as verified.
Two-factor authentication (2FA)
Add a second factor to login or sensitive actions.
- User enables 2FA and provides their phone number.
- On login, create a token for that phone.
- Send the code via SMS (using your SMS provider).
- User enters the code.
- Validate with Octotp before granting access.
Password reset
Verify identity before allowing a password change.
- User requests a password reset.
- Create a token for their email.
- Include the code in your reset email.
- User enters the code on the reset page.
- Validate with Octotp, then allow the password change.
Phone number verification
Confirm that a user owns a phone number (e.g. for account recovery or notifications).
- User adds a phone number.
- Create a token for that number.
- Send the code via SMS.
- User enters the code.
- Validate and mark the phone as verified.
Benefits across use cases
- One API for email and phone verification
- Same flow regardless of channel – create, deliver, validate
- Rate limiting built in to protect your usage
- Secure – codes are hashed; plain code returned only at creation
Get started
See how it works for the step-by-step flow, or the API integration guide for code examples.