User verification and identity

Protect your platform from fraud and keep customer accounts secure with mobile identity signals and multi factor user authentication across sign-up, login and account management.

Protect users with multi factor user authentication
Protect users with multi factor user authentication

Use cases for OTP verifications and mobile intelligence signals

Implement a complete user verification solution to protect customers across the entire journey.

  • Phone with checkmark
    Signup verification

    Prevent fake account creation and establish phone number or email ownership when a user signs up.

  • Security password form field
    Login protection

    Protect against account takeover and password theft by requesting user verification at login.

  • Security padlock
    Secure transactions

    Validate users in real time so you can confidently authorize high-value online transactions.

  • Twilio Email Verification logo
    Account management

    Update personal information with confidence and protect PII.

  • Sheild with a user symbol
    Fraud prevention

    Stop SMS Pumping Fraud, SIM Swap fraud and man-in-the-middle attacks.

How to build secure user authentication

Implement a user authentication solution in days. No need to multisource vendors.

Step 1
Create verification service
Create a verification service with Twilio. This is the set of common configurations used to create and check verifications.


Step 2
Send a verification token
Send a token to your end user through their preferred communication channel, like SMS, voice call, email, or WhatsApp. 


Step 3
Check the verification token
See if the token the user provided is correct. If it’s correct, the request is approved and if it’s incorrect, it stays pending.

Send and check a verification token using Twilio Verify
Send and check a verification token using Twilio Verify

What you need to build intelligent user verification with Twilio

Easy-to-deploy APIs for user verification to prevent fraud, improve user conversion, and lower operational costs.

Verify

Lookup

What it does

Turnkey API to verify users over any channel

Query real-time phone intelligence data to verify phone number validity

Channels

SMS, voice, WhatsApp, email, TOTP, Push, Silent Network Authentication

-

Scale

4.5 billion customer verifications per year

Verify user identities across mobile, landline, fixed and non-fixed VoIP, toll free

Reliability

94%+ global delivery rate*

Route optimization on Twilio Super Network for high deliverability

Use mobile signals to confirm user identities reliably

Conversion

65%+ global conversion rate*

Filter out unwanted or unreachable phone numbers with Line Type Intelligence and Reassigned Number

Fraud prevention

Identify potentially fraudulent numbers, SIM swapped numbers, numbers associated with SMS pumping

Templates

Carrier-approved templates that are automatically translated across 42 languages

-

Reporting

Conversion and success rates per region, and channel

-

Learn more

Build and launch a verification use case in days

Sign up for a free Twilio account to start verifying user identities today. Use quickstarts, up-to-date docs, the Twilio CLI, and CodeExchange to build a prototype quickly.

// Send a SMS verification using Twilio with Python
import os 
from twilio.rest import Client

account_sid = os.environ['TWILIO_ACCOUNT_SID'] 
auth_token = os.environ['TWILIO_AUTH_TOKEN']
client = Client(account_sid, auth_token)
verification = client.verify \
             .v2 \
             .services('VAXXXXXXXXXXXXXXXXXXXXXXX')
             .verifications \
             .create(to='+15017122661', channel='sms')
    )
print(verification.sid)
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Verify.V2.Service;

class Program
{
    static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var verification = VerificationResource.Create(
            to: "+15017122661",
            channel: "sms",
            pathServiceSid: "VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        );

        Console.WriteLine(verification.Sid);
    }
}
<?php
// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$verification = $twilio->verify->v2->services("VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                   ->verifications
                                   ->create("+15017122661", "sms");

print($verification->sid);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

verification = @client.verify
                      .v2
                      .services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                      .verifications
                      .create(to: '+15017122661', channel: 'sms')

puts verification.sid
// Download the helper library from https://www.twilio.com/docs/node/install
// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = require('twilio')(accountSid, authToken);

client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                .verifications
                .create({to: '+15017122661', channel: 'sms'})
                .then(verification => console.log(verification.sid));
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.verify.v2.service.Verification;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Verification verification = Verification.creator(
                "VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                "+15017122661",
                "sms")
            .create();

        System.out.println(verification.getSid());
    }
}
curl -X POST "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Verifications" \
--data-urlencode "To=+15017122661" \
--data-urlencode "Channel=sms" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

Verify quickstart documentation

Get set up with a Twilio account, set up your development environment, validate phone numbers with Lookup, send your first phone verification token with Verify, and validate the token.

Lookup quickstart documentation

Get set up with a Twilio account, set up your development environment, validate and format phone numbers with a Basic Lookup request then use Line Type Intelligence Lookup to see the phone number type.

Why Verify over Programmable Messaging

Verify is a purpose-built user verification solution for reliably sending one-time passwords over SMS and voice, WhatsApp, email, push and Silent Network Authentication, and TOTP.

Prefer not to code? No problem.

Work with one of our trusted partners to get coding support or explore a pre-built user authentication solution.

Work with Twilio Professional Services to set up global call tracking for your company
Work with Twilio Professional Services to set up global call tracking for your company

The Twilio difference

Fast and reliable delivery for user verification messages to keep your platform protected.

Send verification messages using Twilio
Send verification messages using Twilio

*  Based on those customers who provide conversion data
** Terms and conditions apply