Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Twilio Verify Feedback API


(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.

(information)

Info

The Verify Feedback API is intended for customers who use the optional 'custom_code' feature, where they generate their own One-Time-Passcode (OTP) that Verify sends. Contact Twilio Sales(link takes you to an external page) and we'll help you enable this feature.

If you're not using 'custom_code', the Feedback functionality is already provided by the standard workflow of the Verify API.

Twilio Verify, when used with our code generation and validation, uses Twilio's route intelligence engine to optimize SMS and Voice deliverability. This means that we will automatically retry with different routes if users request multiple verification codes without validating codes or if we notice performance is worse than our baseline. Customers who use pin verification through the Verify API get these benefits of deliverability tuning and monitoring feedback of Twilio's system.

When customers use our custom_code feature to send and validate their own codes, we don't get the same transparency. In order to achieve insights into possible deliverability issues, we built a proxy to the Twilio Feedback API that customers can use to send us this data. This allows us to optimize routing and ensure that your verification codes are sent as quickly and reliably as possible.

By using the Feedback API, we'll be able to proactively address potential issues caused by interruptions in telecom routes that affect deliverability. This API will help ensure your user gets a verification code regardless of the telecom infrastructure circumstances.


Send Message Feedback

send-message-feedback page anchor

This call will report the status of a message.


_10
POST https://api.authy.com/2010-04-01/Accounts/Messages/SMS/Messages/{SMSMessageSid}/Feedback

URL

url page anchor
NameTypeDescription
ApiKeyStringThe API Key for your Verify Application.
SMSMessageSidStringThe sms_id found in the response of a phone verification start.
NameTypeDescription
OutcomeString (optional)received if the customer correctly entered the code provided in the message or not-received if the customer took no action within 2 minutes. (🏢 not PII )

Start by sending a verification code to a user's phone number.


_10
curl 'https://api.authy.com/protected/json/phones/verification/start' \
_10
-H "X-Authy-API-Key: d57d919d11e6b221c9bf6f7c882028f9" \
_10
-d via='sms' \
_10
-d phone_number='111-111-1111' \
_10
-d country_code=1 \
_10
-d locale='en' \
_10
-d custom_code=12345

Sample response:


_10
{
_10
"carrier": "AT&T Wireless",
_10
"is_cellphone": true,
_10
"message": "Text message sent to +1 111-111-1111.",
_10
"seconds_to_expire": 599,
_10
"uuid": "caf8eb00-6d03-1234-5678-0eb34144aeb2",
_10
"sms_id": "cafd7a60-6d03-1234-5678-0eb34144aeb2", // You'll use this ID to send feedback
_10
"success": true
_10
}

This will send an SMS to the user.

If the user correctly enters the code in your application send the following:


_10
curl -XPOST 'https://api.authy.com/2010-04-01/Accounts/d57d919d11e6b221c9bf6f7c882028f9/SMS/Messages/cafd7a60-6d03-1234-5678-0eb34144aeb2/Feedback.json' \
_10
-d Outcome='received'

If the user takes no action within 2 minutes send the following:


_10
curl -XPOST 'https://api.authy.com/2010-04-01/Accounts/d57d919d11e6b221c9bf6f7c882028f9/SMS/Messages/cafd7a60-6d03-1234-5678-0eb34144aeb2/Feedback.json' \
_10
-d Outcome='not-received'

Response


_10
{
_10
"account_sid": "",
_10
"message_sid": "cafd7a60-6d03-1234-5678-0eb34144aeb2",
_10
"outcome": "received",
_10
"date_created": "Wed, 18 Jul 2018 21:59:40 +0000",
_10
"date_updated": "Wed, 18 Jul 2018 22:02:29 +0000",
_10
"uri": "",
_10
"success": true
_10
}

Your account_sid and uri will be empty in this response.


Rate this page: