Skip to main content

Verify TOTP

By Twilio

  • Verify
  • Twilio
  • Quick Deploy
  • Applications

This app will show you an example of how to build a time-based one-time passcode (TOTP) experience using your favorite authenticator app (like Google Authenticator or Authy) with the Twilio Verify API.

TOTP is a more secure alternative to SMS 2FA and is a popular form of authentication for higher risk users (politicians, celebrities, journalists) or platforms (email, banking).

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 an example onboarding flow.

How it works:

  1. User enters their username
  2. App generates a QR code
  3. User scans QR code in a compliant authenticator app
  4. User enters the correct token
  5. App verifies the token and the factor
  6. App verifies additional factors on an ongoing basis

For more information, check out:

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:Log in to Twilio
Step 2:Set up your application
Step 3:Deploy your application and try it out!
Deploy this application
This will use the details entered above to deploy your application to Twilio Functions. You will be able to view the application in the browser and edit it using the Functions UI. Learn more about Twilio Functions
Deploying applicationThis might take up to a minute
Success! Your application has been deployed.
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

There was an issue loading the page.

Please try again in some time.