Verify: Phone Verification by API and SDK - Twilio
Register for SIGNAL by 8/31 for $250 off. Register now.

Verify Phone Verification

With Twilio, you can quickly verify phone number ownership, reduce fraudulent accounts, and speed up account onboarding.

Create your first verification
Twilio handles storing verification tokens and making sure messages are delivered globally.
Twilio servers
Your app provides the phone number and verification method (SMS or Voice)
Your app
curl -XPOST '' \
-H "X-Authy-API-Key: d57d919d11e6b221c9bf6f7c882028f9" \
-d via='sms' \
-d phone_number='987-654-3210' \
-d country_code=1 \
-d code_length=6 \
-d locale='en'
The user receives a verification token.
Your verification code is: 3690

Get Started

With just a few lines of code, you'll send your first verification token to a user's phone with the Verify API. Add a few more and you can check the verification token. Choose your programming language to get started.


# composer require 'authy/php'
require './vendor/autoload.php';

$authy_api = new Authy\AuthyApi('YOUR_AUTHY_API_KEY');

$res = $authy_api->phoneVerificationStart('5551234567', '1', 'sms');

if ($res->ok()) {
    print $res->message();
// npm install authy
const authy = require("authy")("YOUR_AUTHY_API_KEY");

  .verification_start("5551234567", "1", "sms", function(err, res) {
    if (err) {

# pip install authy
from authy.api import AuthyApiClient 

authy_api = AuthyApiClient("YOUR_AUTHY_API_KEY")

res = authy_api.phones.verification_start(

if res.ok():
# gem install authy
require 'authy'

Authy.api_key = 'YOUR_AUTHY_API_KEY'
Authy.api_uri = ''

res = Authy::PhoneVerification.start(
    via: "sms", 
    country_code: 1, 
    phone_number: "5551234567")

if res.ok?
  puts res
public static async Task StartPhoneVerification(string[] args)
    var client = new HttpClient();

    var AuthyAPIKey = "YOUR_API_KEY";
    client.DefaultRequestHeaders.Add("X-Authy-API-Key", AuthyAPIKey);

    var requestContent = new FormUrlEncodedContent(new[] {
        new KeyValuePair<string, string>("via", "sms"),
        new KeyValuePair<string, string>("phone_number", "5551234567"),
        new KeyValuePair<string, string>("country_code", "1"),

    HttpResponseMessage response = await client.PostAsync(

    HttpContent responseContent = response.Content;

    using (var reader = new StreamReader(await responseContent.ReadAsStreamAsync()))
        Console.WriteLine(await reader.ReadToEndAsync());
curl -XPOST '' \
-d via='sms' \
-d phone_number='5551234567' \
-d country_code=1 \
-d code_length=6 \
-d locale='en'

Ahoy, World!

Create your first verification. Jump to a Quickstart in the language of your choice:

Build Your App

You have customers to protect. Let’s get phone verification to production.

Pick the docs that are right for you. These short tutorials, sample apps, and API reference docs will get you to HTTP 200 OK.

Localization & Next Steps

Verify solves complex development challenges so you can focus on the code that counts. From carrier regulations to device-specific capabilities, Verify spots and solves for mission critical communication variables, ensuring your message is always delivered.