Skip to contentSkip to navigationSkip to topbar

One-click Email Verification with "Magic Links"

Created by: Twilio
  • Verify
  • Email
  • JavaScript
  • Quick Deploy

This app will show you an example of how to build one-click email verification using the Twilio Verify API(link takes you to an external page) and Twilio SendGrid API.

This sample uses function templates(link takes you to an external page) to quickly create and deploy serverless functions you can use to interface with the Twilio Verify API from your production application. The interface provided allows you to test the functions.

(warning)

Warning

This application requires additional configuration using Twilio SendGrid. Please follow steps 1-6 in the documentation(link takes you to an external page), using this code(link takes you to an external page) in your SendGrid email template.

magic-link-demo.gif.

How it works:

  1. User enters their email
  2. App populates the email template and sends email to the user
  3. User clicks the link in their email
  4. App verifies the token
Report this template(link takes you to an external page)
Quick Deploy to TwilioGet CodeUse Twilio CLI
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(link takes you to an external page)
  1. Log in to Twilio

    Access your Twilio account to get started.

    Checking for existing account...

  2. Verify Service SID

    SID of your Twilio Verify Service

  3. Callback Path

    URL path linked in the email template to check verifications

  4. Click the button below to deploy your app

    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.

Need some help?

We all do sometimes; code is hard. Get help now from our support team(link takes you to an external page), or lean on the wisdom of the crowd by browsing the Twilio tag(link takes you to an external page)on Stack Overflow.

Terms of servicePrivacy Policy

Copyright © 2025 Twilio Inc.