Verify API

As part of Twilio's account security offerings, the Twilio Verify API makes it simple to add phone verification to your web application. It supports codes sent via voice and SMS. To start working with the API, first create an application in the console and get the API Key.

API Base URL

All URLs in the reference documentation use the following base URL:

https://api.authy.com

All requests to the Verify REST API are served over HTTPS. Unencrypted HTTP is not supported.

Verify API Keys

All HTTP requests to the Verify REST API /protected endpoints are protected with an API Secret you pass as an HTTP header X-Authy-API-Key, e.g.:

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='987-654-3210' \
-d country_code=1

The Verify API Key can be found in the Verify section of the Twilio Console after clicking through to your application.

Verify Production API Key

We've created a version of the Verify API that works with your Twilio API Keys and Twilio endpoints. Contact Twilio Sales if you would like to be part of the beta.

Verify API Reference

Want to jump straight to the API Reference? These pages are laid out in the rough order you'll need to follow in your phone verification implementation.

Need help troubleshooting an error or understanding a response?

Supported Formats

The Verify API currently supports JSON and XML formats. When making API calls, you will need to specify json or xml format.

cURL API Examples

We've built out a repository which includes cURL commands for various actions you can take through the API. We've also included Postman collection and environment examples as well.

Verify Helper Libraries

We maintain helper libraries to abstract phone verification API calls for all of our standard web languages.

Android Phone Verification SDK

The Twilio Verify SDK for Android allows you to add our phone verification functionality into your mobile application. It greatly simplifies the process of validating a phone number from within an Android mobile app.

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.