Introducing Verify v2: Phone verification re-built from the ground up.

April 07, 2019
Written by

Twilio Verify

Confidence in your users’ phone numbers decreases fraud and increases the reliability of communications with them. Twilio’s Verify API is used to verify ownership of 235 million phone numbers each year. With all the delivery and business logic prebuilt, Verify can be implemented in just 2 API calls.

For 2019, Verify has been rebuilt to fully leverage the Twilio platform, resulting in a 300% increase in requests per second (RPS), greater integration with the Console, improved library support, and granular verification logs. We’re excited to announce that this new API, Verify v2, is now in public beta.

Visibility Improvements

  • Easily trace and troubleshoot phone verifications using new logs in the Twilio Console, helping you monitor individual verifications on a per-user basis.
  • Proactively respond to shifts in verification traffic with metrics that show verification destinations and geographic trends. For example, identifying low success rates in Argentina or South Korea.
  • React quickly to anomalies in traffic with week-over-week trends that help to establish baselines (for example, average code delivery time) and identify irregularities.

Graph of verifications by line type

Enhanced Fraud Protection

Full integration with the Twilio Platform

  • Leverage advanced Identity and Access Management (IAM) features of the Twilio API to securely integrate Verify into your application with Public Key Client Validation or scoped API Keys.

Stronger Transaction Verification for PSD2 compliance

  • Rapidly prepare your business for PSD2 by verifying transactions globally with Verify’s managed telephony to reach consumers via SMS and Voice. Learn more.

We should remind readers that since Verify v2 is currently available as a Public Beta product, some features are not yet implemented and others may be changed before the product is declared as Generally Available. Public Beta products are not covered by a Twilio SLA.

Need to migrate from Verify v1 API?

For current Verify v1 users it’s pretty straight forward to migrate over to the new API. If you’ve been using Authy helper libraries, you will need to swap those out for Twilio helper libraries. Here is an example of the differences between V1 and V2 when starting a phone verification.

Verify v1:

$authy_api = new Authy\AuthyApi('#your_api_key');
$authy_api->phoneVerificationStart('123-456-7890', '1', 'sms');

Verify v2:


$twilio = new Client($account_sid, $auth_token);
$verification = $twilio->verify->v2->services("VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                   ->verifications
                                   ->create("+11234567890", "sms");

If you had written your application directly against the Verify API, then you will need to update the endpoints and parameters for the integration. Verify v2 maintains the same start / check pattern that is used in v1, so there's is not much additional overhead for migrating.

Verify v1 API Request:


curl -XPOST 'https://api.authy.com/protected/json/phones/verification/start' \
-H "X-Authy-API-Key: $VERIFY_API_KEY" \
-d via='sms' \
-d phone_number='123-456-7890' \
-d country_code=1

Verify v2 API Request:


curl -X POST https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Verifications \
--data-urlencode "To=+11234567890" \
--data-urlencode "Channel=sms" \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token

Get Started!

To get started with Verify v2 just login to the Twilio Console and create a new service, also check out our docs for the details on the API. Remember, once you have verified the user’s identity, you’ll still want to securely authenticate them at login.