• Home
  • >
  • One-Time Passcode Verification (OTP)

One-Time Passcode Verification (OTP)

By Twilio

  • Popular
  • Verify
  • Twilio
  • Quick Deploy
  • Applications

This app will show you an example of how to build a one-time passcode (OTP) experience using SMS, voice, or email* with the Twilio Verify API.

This sample uses function templates to quickly create and deploy serverless functions you can use to interface with the Twilio Verify API from your production application. The interface provided shows off available features including channel selection and language preference.


How it works:

  1. User enters their phone number or email
  2. App generates an authentication token
  3. App sends the token via selected channel to the user
  4. User enters the correct token
  5. App verifies the token

For more information, check out this blog post on serverless phone verification.

*Note: email channel requires additional configuration, follow the instructions in the docs.

Launch and test this app in a few minutes with Quick Deploy. No server needed. Quick Deploy will automatically configure and deploy this app using Twilio Functions. Learn more about Twilio Functions
Step 1:Sign into your Twilio account
Log in to your Twilio account
Step 2:Customize your application
Step 3:Deploy your application with a click
When you click "Deploy my application", we will automatically use your custom details above to deploy your app to Twilio Functions. You can view the application in the browser and edit it to fit your needs using the Functions UI.
Deploying applicationThis might take up to a minute
Oops...something went wrong. Retry
Step 4:View and edit your application
Once deployed, any changes to the fields above will not be applied to your app. To make changes, here are two options
Refresh the page, edit customizations and re-deploy the application
Edit your customizations directly in code
Why use Quick Deploy?
No coding required to launch
Easy to edit and iterate post launch
No server management
Scales automatically
Secure by default

Don't see what you want? Request a code sample Explore Docs

Questions about scaling, pricing, or which products/features to use? Get a consultation

There was an issue loading the page.

Please try again in some time.