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

Verify Events


(information)

Info

Verify Events is in Pilot!

This Verify feature is currently in the Pilot maturity stage, which means that we're actively looking for early-adopter customers to try it out and give feedback. That could be you!

Onboarding is now a self-serve process, follow our Verify Events Onboarding Guide for a step-by-step walkthrough.

Please note that Verify Events currently only supports SMS, WhatsApp, and Voice channels.

Verify Events helps your business by providing instantaneous, real-time information on the activity of your Verify Service. It is supported by Twilio Event Streams API, an API that allows you to tap into a unified stream of interactions across different Twilio products. Use Verify Events for granular visibility to track:

  • Verification delivery statuses
  • Verification success rates
  • Latency
  • Overall performance

Getting started with Event Streams API

getting-started-with-event-streams-api page anchor

Verify Events is powered by Twilio's Event Streams API. You can also learn more about Event Streams API by reading its documentation or FAQ.

You can stream Verify Events data to your existing systems by configuring a modern, persistent streaming technology like Amazon Kinesis or to a webhook.

Amazon Kinesis(link takes you to an external page) is a data streaming platform where you can collect and process large streams of data in real time. Amazon Kinesis is within the AWS ecosystem, so its infrastructure is fully managed for you and it is easily scalable with low latency.

Webhooks, or status callbacks, are HTTP requests that are triggered to send to a user-defined URL when events happen. With this option, Event Streams API will send either an HTTP POST or an HTTP GET request to the URL you specify. The request body will contain all of the information about that incoming Verify Event.

Onboarding onto Verify Events on Event Streams is now a self-serve process, follow our Verify Events Onboarding Guide for a step-by-step walkthrough.


There are currently six Verify Events that can be subscribed to via Event Streams, representing different states of a Verification.

Verification Pending

verification-pending page anchor
Event Type Stringcom.twilio.accountsecurity.verify.verification.pending
Description and TimingEvent is emitted after a Start New Verification API call is successfully made, and a Verification is pending further action from the end user or client.
Event Type Stringcom.twilio.accountsecurity.verify.verification.approved
Description and TimingEvent is emitted after a Check Verification API call is made and it returns that a Verification's status is approved, or a Update a Verification Status API call is made with the status approved.
Event Type Stringcom.twilio.accountsecurity.verify.verification.canceled
Description and TimingEvent is emitted after an Update a Verification Status API call is made for a Verification with the status canceled.
Event Type Stringcom.twilio.accountsecurity.verify.verification.expired
Description and TimingEvent is emitted after a Verification expires. The default expiration time is 10 minutes after Verification creation.

Verification Max Attempts Reached

verification-max-attempts-reached page anchor
Event Type Stringcom.twilio.accountsecurity.verify.verification.max-attempts-reached
Description and TimingEvent is emitted after a Verification fails from either attempting to send or check the Verification 5 or more times.

Sample event payload with custom code disabled

sample-event-payload-with-custom-code-disabled page anchor

_55
[
_55
{
_55
"specversion": "1.0",
_55
"type": "com.twilio.accountsecurity.verify.verification.approved",
_55
"source": "/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications/VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_55
"id": "50ae352aa7c98cbae53b8d0e6c0767b9a445b74e029bfb4f8c7d6efba8ca260b",
_55
"dataschema": "https://events-schemas.twilio.com/AccountSecurity.VerifyEventStreamEvent/1",
_55
"datacontenttype": "application/json",
_55
"time": "2022-02-02T09:20:25.336Z",
_55
"data": {
_55
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_55
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_55
"verification_sid": "VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_55
"friendly_name": "my service",
_55
"custom_code_enabled": false,
_55
"custom_friendly_name": "custom friendly name",
_55
"created_at": "2022-02-02T09:20:25.336676Z",
_55
"verified_at": "2022-02-02T09:20:25.336676Z",
_55
"to": "+919999999999",
_55
"verification_status": "APPROVED",
_55
"country": "IN",
_55
"code_length": 4,
_55
"send_code_attempts": {
_55
"count": 2,
_55
"attempts": [
_55
{
_55
"time": "2022-08-24T12:49:09.598837Z",
_55
"channel": "SMS",
_55
"attempt_sid": "VLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1",
_55
"delivery_status": "DELIVERY_UNKNOWN",
_55
"error_code": "30008",
_55
"locale": "en"
_55
},
_55
{
_55
"time": "2022-08-24T12:49:44.356564Z",
_55
"channel": "SMS",
_55
"attempt_sid": "VLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2",
_55
"delivery_status": "DELIVERED",
_55
"locale": "en"
_55
}
_55
]
_55
},
_55
"check_attempts": {
_55
"count": 1,
_55
"attempts": [
_55
{
_55
"time": "2022-02-02T09:20:25.336676Z",
_55
"status": "SUCCESS"
_55
}
_55
]
_55
},
_55
"expired_at": "2022-02-02T09:30:25.336676Z"
_55
}
_55
}
_55
]

Sample event payload with custom code enabled and feedback disabled

sample-event-payload-with-custom-code-enabled-and-feedback-disabled page anchor

_47
[
_47
{
_47
"specversion": "1.0",
_47
"type": "com.twilio.accountsecurity.verify.verification.pending",
_47
"source": "/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications/VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_47
"id": "50ae352aa7c98cbae53b8d0e6c0767b9a445b74e029bfb4f8c7d6efba8ca260b",
_47
"dataschema": "https://events-schemas.twilio.com/AccountSecurity.VerifyEventStreamEvent/1",
_47
"datacontenttype": "application/json",
_47
"time": "2022-02-02T09:20:25.336Z",
_47
"data": {
_47
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_47
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_47
"verification_sid": "VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_47
"friendly_name": "my service",
_47
"custom_code_enabled": true,
_47
"custom_friendly_name": "custom friendly name",
_47
"created_at": "2022-02-02T09:20:25.336676Z",
_47
"to": "+919999999999",
_47
"verification_status": "PENDING",
_47
"country": "IN",
_47
"send_code_attempts": {
_47
"count": 2,
_47
"attempts": [
_47
{
_47
"time": "2022-08-24T12:49:09.598837Z",
_47
"channel": "SMS",
_47
"attempt_sid": "VLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1",
_47
"delivery_status": "DELIVERY_UNKNOWN",
_47
"error_code": "30008",
_47
"locale": "en"
_47
},
_47
{
_47
"time": "2022-08-24T12:49:44.356564Z",
_47
"channel": "SMS",
_47
"attempt_sid": "VLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2",
_47
"delivery_status": "DELIVERED",
_47
"locale": "en"
_47
}
_47
]
_47
},
_47
"check_attempts": {
_47
"count": 0
_47
},
_47
"expired_at": "2022-02-02T09:30:25.336676Z"
_47
}
_47
}
_47
]

Sample event payload with custom code enabled and feedback enabled

sample-event-payload-with-custom-code-enabled-and-feedback-enabled page anchor

_54
[
_54
{
_54
"specversion": "1.0",
_54
"type": "com.twilio.accountsecurity.verify.verification.approved",
_54
"source": "/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications/VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_54
"id": "50ae352aa7c98cbae53b8d0e6c0767b9a445b74e029bfb4f8c7d6efba8ca260b",
_54
"dataschema": "https://events-schemas.twilio.com/AccountSecurity.VerifyEventStreamEvent/1",
_54
"datacontenttype": "application/json",
_54
"time": "2022-02-02T09:20:25.336Z",
_54
"data": {
_54
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_54
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_54
"verification_sid": "VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_54
"friendly_name": "my service",
_54
"custom_code_enabled": true,
_54
"custom_friendly_name": "custom friendly name",
_54
"created_at": "2022-02-02T09:20:25.336676Z",
_54
"verified_at": "2022-02-02T09:20:25.336676Z",
_54
"to": "+919999999999",
_54
"verification_status": "APPROVED",
_54
"country": "IN",
_54
"send_code_attempts": {
_54
"count": 2,
_54
"attempts": [
_54
{
_54
"time": "2022-08-24T12:49:09.598837Z",
_54
"channel": "SMS",
_54
"attempt_sid": "VLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1",
_54
"delivery_status": "DELIVERY_UNKNOWN",
_54
"error_code": "30008",
_54
"locale": "en"
_54
},
_54
{
_54
"time": "2022-08-24T12:49:44.356564Z",
_54
"channel": "SMS",
_54
"attempt_sid": "VLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2",
_54
"delivery_status": "DELIVERED",
_54
"locale": "en"
_54
}
_54
]
_54
},
_54
"check_attempts": {
_54
"count": 1,
_54
"attempts": [
_54
{
_54
"time": "2022-02-02T09:20:25.336676Z",
_54
"status": "SUCCESS"
_54
}
_54
]
_54
},
_54
"expired_at": "2022-02-02T09:30:25.336676Z"
_54
}
_54
}
_54
]


Event resource properties

event-resource-properties page anchor

The Verify Events you receive are based on a common schema of the following properties. Note that some properties will only be present if they are applicable to that specific Verify event, otherwise they will be null.

PropertyTypeDescription
account_sidstringThe unique SID identifier of the Account that created the Verification.
service_sidstringThe unique SID identifier of the Verify Service that generated the Verification.
verification_sidstringThe unique SID identifier of the Verification.
friendly_namestringThe chosen friendly name of the Verify Service.
custom_friendly_namestringIf applicable, the custom friendly name of the Verify Service.
created_atstringThe date and time that the Verification was created in ISO 8601 format.
verified_atstringIf applicable, the date and time that the Verification was approved in ISO 8601 format.
expired_atstringIf applicable, the date and time that the Verification expired in ISO 8601 format.
verification_statusstringThe status of the Verification, can be one of: PENDING, APPROVED, CANCELED, EXPIRED, MAX_ATTEMPTS_REACHED.
tostringThe Verification's destination phone number in E.164 format.
countrystringThe country code that the Verification was delivered to.
custom_code_enabledbooleanThis will be true if the Verification was sent using a custom code and false if not.
code_lengthintegerIf applicable, the Verification code length. This will be null if a custom code is enabled.
send_code_attemptsobjectAn object containing information about sent Verification Attempts. See SendCodeAttempts property definitions here.
check_attemptsobjectAn object containing information about Verification Check attempts. See CheckAttempts property definitions here.

SendCodeAttempts properties

sendcodeattempts-properties page anchor

The Verify Event's send_code_attempts property provides information about all Verification Attempts sent to the end user for a Verification.

PropertyTypeDescription
countintegerThe total number of Verification Attempts sent.
attemptsarrayIf applicable, an array containing SendCodeAttemptsList objects contain information on each Verification Attempt. See SendCodeAttemptsList property definitions here.

SendCodeAttemptsList properties

sendcodeattemptslist-properties page anchor

The Verify Event's send_code_attempts property may contain an attempts array that holds SendCodeAttemptsList objects. The SendCodeAttemptsList object provides information about each Verification Attempt that was made.

PropertyTypeDescription
timestringThe date and time that the Verification Attempt was created in ISO 8601 format.
channelstringThe communication channel that was used, such as SMS.
attempt_sidstringThe unique SID identifier of the Verification Attempt.
delivery_statusstringIf applicable, the message delivery status. Can be one of: DELIVERED, UNDELIVERED, DELIVERY_UNKNOWN, SENT, FAILED, ACCEPTED, QUEUED, SENDING. See this support article(link takes you to an external page) for more details on these statuses.
error_codestringIf applicable, the message delivery error code. See Twilio Error and Warning Dictionary for more details.
localestringThe language used for the Verification Attempt.

CheckAttempts properties

checkattempts-properties page anchor

The Verify Event's check_attempts property provides information about all Verification Checks that were made for a Verification.

PropertyTypeDescription
countintegerThe total number of Verification Checks made.
attemptsarrayIf applicable, an array containing CheckAttemptsList objects that contain information on each Verification Check. See CheckAttemptsList property definitions here.

CheckAttemptsList properties

checkattemptslist-properties page anchor

The Verify Event's check_attempts property may contain an attempts array that holds CheckAttemptsList objects. The CheckAttemptsList object provides information about each Verification Check that was made.

PropertyTypeDescription
timestringThe date and time that the Verification Check was performed in ISO 8601 format.
statusstringThe status of the Verification Check, can be one of: SUCCESS, FAILURE.

What should I consider when choosing between using Verification Attempts API and Verify Events?

what-should-i-consider-when-choosing-between-using-verification-attempts-api-and-verify-events page anchor

Verification Attempts API is a REST API that allows you to list and filter Verification Attempts generated by your Verify Service in the last 30 days. It is not real-time, but it can be used for reporting and troubleshooting.

Verify Events API is a real-time data stream that allows you to consume data about your Verifications using a streaming platform like Amazon Kinesis or with webhooks. It helps you to analyze granular data and build your own performance dashboards.

Are there any cases where Verification status cannot be determined?

are-there-any-cases-where-verification-status-cannot-be-determined page anchor

If you have custom codes enabled and are not using the Update a Verification Status endpoint to report Verification status updates, Verify Events will not have verification status available.

How is Verification Attempt delivery status determined?

how-is-verification-attempt-delivery-status-determined page anchor

Delivery reporting status (DLR) is relayed to Twilio from each carrier. A message's delivery reporting is not always available right away if it is delayed from carriers. If delivery status is not available at the time a Verify Event is published, it will be listed as null. In that case, the Verify Events system will attempt to retrieve delivery status several times for up to 24 hours and will publish a second Event with the updated delivery status if found.

How much does using Verify Events cost?

how-much-does-using-verify-events-cost page anchor

Verify Events are offered at no additional charge to Verify customers.


Rate this page: