Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

メニュー

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

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 maintained for the time being, but 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

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

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

Credentials / Authentication

V1 required an Authy API Key. The Verify V2 API uses your Twilio Credentials found in the Console like in the following request:

curl -XPOST https://verify.twilio.com/v2/Services \
    -d FriendlyName=MyServiceName \
    -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

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

E.164 Phone Number Formatting

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.

PSD2 Support

Verify V2 supports PSD2 compliant transaction specific verifications with optional payee and amount fields. See the API reference documentation for details.

Improved Visibility and Insights

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

verification logs

Bring your own Messaging Service

If you're a Copilot user or would like to bring your own messaging service instead of creating one through Verify, you can do so with the new Verify API. Take a look at the Verify Messaging Configuration docs for more information

Python Example

For an example of upgrading from 1.x to 2.x, take a look at this lightweight Python/Flask Example.

Rate this page:

ヘルプが必要ですか?

誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。