Skip to contentSkip to navigationSkip to topbar
On this page

Migrating from 1.x to 2.x


(warning)

Warning

Verify v1 API has reached End of Sale. It is now closed to new customers and will be fully deprecated in the future.

For new development, we encourage you to use the Verify v2 API. v2 has an improved developer experience and new features, including:

  • Twilio helper libraries in multiple languages
  • PSD2 Secure Customer Authentication Support
  • Improved Visibility and Insights

Existing customers will not be impacted at this time until Verify v1 API has reached End of Life. For more information about migration, see Migrating from 1.x to 2.x.

Version 2 of the Verify API has an improved developer experience and new features. Version 1 of the API will be fully deprecated in the future and any new development will be on Version 2.

Some of the exciting features of the V2 API include:

...and more!

This guide provides an introduction to the 2.x Verify API and a set of guidelines to migrate an application from 1.x to 2.x.


2.x Base API

2x-base-api page anchor

Verify 2.x is now hosted on Twilio's API. The new base URL is:

https://verify.twilio.com/v2/

Credentials / Authentication

credentials--authentication page anchor

V1 required an Authy API Key. The Verify V2 API uses your Twilio Credentials found in the Console(link takes you to an external page) like in the following request:

1
curl -XPOST https://verify.twilio.com/v2/Services \
2
-d FriendlyName=MyServiceName \
3
-u '[YOUR ACCOUNT SID]:[YOUR AUTH TOKEN]'

Twilio helper libraries now support Verify. You no longer need the separate Authy helper libraries. We officially support libraries for:

Check out our API Reference for examples and more information.


Applications are now Services

applications-are-now-services page anchor

2.x relies on Services for configuration. In V1 you created an Authy or Verify Application and used that API Key to manage verifications. In V2 you need both your Twilio Credentials and a Service ID. You can create and update a Service in two ways:

  1. With the Verify API
  2. In the Verify Console(link takes you to an external page)

E.164 Phone Number Formatting for SMS and Voice

e164-phone-number-formatting-for-sms-and-voice page anchor

V1 used country code and phone number as two separate parameters. In V2, phone numbers are processed as one parameter in E.164 format like this: +15552317654.


Verify V2 supports PSD2(link takes you to an external page) compliant transaction specific verifications with optional payee and amount fields. See the API reference documentation for details.


Improved Visibility and Insights

improved-visibility-and-insights page anchor

Only available with our new Verify API, view the status of your verifications in the console:

verification logs.

For an example of upgrading from 1.x to 2.x, take a look at this lightweight Python/Flask Example(link takes you to an external page).

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.