Introducing Verify v2: One API to Verify Users via Email, SMS, and Voice
Time to read: 2 minutes
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 2020, Verify has been rebuilt to include email delivery channel for OTPs, and fully leverage the Twilio platform, resulting in a 300% increase in requests per second (RPS), integration with Twilio Debugger, improved library support, and granular verification logs. We’re excited to announce that this new API, Verify v2, is now in GA.
Email channel for OTP delivery
- Verify users on the channel they prefer. Verify allows you to send OTPs via Email, SMS, Voice, and other OTT channels we add in the future, without the stress of orchestrating multiple APIs.
Customize originating phone numbers
- Use existing shortcodes, long codes or alpha sender IDs for phone verifications. With region level configuration you can mix and match existing resources with Verify's managed telephony.
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.
Enhanced Fraud Protection
- Protect your business from international revenue sharing fraud (IRSF) with built-in, per-phone number rate limits, maintained and monitored by Twilio Super Network.
- Customize your verification rate limits based on properties like end user IP address, geolocation, phone number, and country code.
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.
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:
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. For that you can use our Authy Two-factor Authentication API.
Related Posts
Related Resources
Twilio Docs
From APIs to SDKs to sample apps
API reference documentation, SDKs, helper libraries, quickstarts, and tutorials for your language and platform.
Resource Center
The latest ebooks, industry reports, and webinars
Learn from customer engagement experts to improve your own communication.
Ahoy
Twilio's developer community hub
Best practices, code samples, and inspiration to build communications and digital engagement experiences.