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

One-Time Passcode Verification (OTP)

By Twilio

  • Popular
  • Verify
  • Twilio
  • Host on Twilio
  • Applications

Check out a live demo of this sample on Glitch: https://atlantic-vault.glitch.me/

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.

Login_with_Twilio_Verify.png

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.

Step 1:

Step 2: You need an API key to get started

Get a free API key

Step 3: Set up the code sample locally

Deploy

OR

Read setup instructions

Step 4:Questions about scaling, pricing, or infrastructure? Talk to an expert

Don't see what you want?

There was an issue loading the page.

Please try again in some time.