Getting Started with Twilio Verify V2

Verify V2 is the latest version of Twilio's phone verification API. With Verify V2, customers can quickly and easily add account security to their webapps, with the same Twilio libraries you already use. Please continue reading for additional information.

New in Verify V2

With Verify V2, we are introducing a number of changes over the old Verify V1 API. Here are some of the highlights:

  • Verify V2 API commands are now built into Twilio's Helper Libraries
    • This means you'll use your Twilio Account SID and Auth Token
  • The API endpoint for Verify V2 is now https://verify.twilio.com/v2/.
  • Verify V2 applications are now known as Verification Services -
  • Each individual verification from a Verification Service has a VEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Verification SID.
  • Phone Numbers now use standard E.164 formatting.

For more details, please see Verify V2 API (Twilio Docs).

Create a Verify V2 Service

Here are the steps for creating a new Verify V2 service via Console:

  1. Access the Verification Services page in Console.
  2. Click Create Service Now.
  3. Enter the desired Service name, and then click Create.
    Create_02_400px.png
  4. Your Verification Service will be created. Adjust the settings as desired, and then click Save as needed.
    Lookup_02_400px.png

Verify V2 Services can also be created via the REST API. Here’s an example cURL script:

curl -X POST https://verify.twilio.com/v2/Services \
--data-urlencode "FriendlyName=My Verify V2 Service" \
--data-urlencode "CodeLength=6" \
--data-urlencode "LookupEnabled=true" \
--data-urlencode "SkipSmsToLandlines=true" \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token

This example will create a new Verify V2 Verification Service called My Verify V2 Service under the project SID used in this request. This service will use 6-digit authentication codes, and block verifications with landline phone numbers. To make this script work for you, make the following updates, and then paste it into a terminal window:

  • Line 2 update with the desired Verification Service name
  • Line 3 update with the desired verification code digit length
  • Line 6 update with your Account SID and Auth Token

Additional optional parameters can be added in your request including PSD2 parameters, specific text-to-speech services, and more. For full details on each of the available options, please see Create a Verification Service (Twilio Docs).

Migrating to Verify V2

We have created a guide to assist users transitioning existing Authy Verify (V1) applications over to V2. For full details, please see the Verify V2 Migration Guide (Twilio Docs).

Have more questions? Submit a request
Powered by Zendesk