Menu

Expand
Rate this page:

Verify Events Onboarding Guide

Verify Events allows you to access instantaneous, real-time information on the activity of your Verify Service by subscribing to a stream of Verify interactions.

In this guide we'll walk through the webhook onboarding process and explain the different methods you can use to integrate with Verify Events.

Not using a webhook? For more information on integrating using Amazon Kinesis, see Twilio Event Streams Kinesis Quickstart.

Click on the link to jump to that onboarding method:

Onboarding with Twilio Console

Twilio Console allows you to onboard completely within the Console itself, no code or command line required.

Step 1: Setup

If you haven’t used Event Streams before, you'll want to pin it to your Twilio Console so its easily accessible.

First navigate to the Twilio Console > Explore Products page. In the Developer tools product section, select the pin icon next to Event Streams to keep it pinned to your sidebar.

Step 2: Configure and create a sink

Now let's create a new sink! A sink is the destination where events will be delivered.

Navigate to the Twilio Console > Event Streams > Manage page and select Create new sink.

Give your sink a description. This should be a recognizable, human-readable name to help you identify the sink easily such as verify-events-webhook-sink.

Next, select your sink type. In this guide we'll be setting up the webhook sink type.

Before finalizing the sink's creation, you'll need to provide some additional details and configuration information. We recommend setting Batch to False so you can handle and process each event individually.

Step 3: (Optional) Validate sink connection

Once your sink is created, you'll be prompted to validate your sink connection.

You can optionally validate the webhook sink connnection before proceeding. Validating the connection will trigger a send of a test event to your webhook endpoint URL. Once your webhook endpoint receives the test, submit the test event ID from the event's request body to complete the validation.

Step 4: Configure and create a subscription

To finish up, we need to create a subscription for your sink. A subscription defines which events will be sent to your sink.

Navigate to the Twilio Console > Event Streams > Manage page, select Create and choose New subscription.

When you reach the Select event types for this subscription section, select Verify under the Product groups menu.

You can subscribe to one or more event types. Select all the events that you would like streamed to your sink destination by choosing their schema version (schema version 1 is the oldest). Read more about each Verify event type here.

Screenshot of Event Streams Create a New Subscription page showing the available Verify events

That's it! Once the subscription is created, Verify events will start flowing into your webhook application when they occur.

Onboarding with Event Streams API

This onboarding experience involves making calls to the Twilio Event Streams API using a Twilio Helper Library, twilio-cli, or cURL.

Step 1: Setup

Note your Twilio Account SID and Auth Token from the Console, these will both be used to authenticate your calls.

Step 2: Configure and create a sink

Now we'll need to configure and create a sink using the Twilio Event Streams Sink API. A sink is the destination where events will be delivered.

        
        
        

        Create a New Sink

        Make a note of the new sink's sid included in the response, it will be in the format DGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. You will use this information when you create a subscription in a later step.

        Step 3: Explore Verify event schemas

        The schema of an event defines how its information is organized. You can inspect the schema to explore the fields of an event type before using it, or use it to validate that the events you receive match their published schemas in production.

        In this call, we're getting the version 1 schema of all available Verify events:

        curl -X GET https://events-schemas.twilio.com/AccountSecurity.VerifyEventStreamEvent/1

        Step 4: Configure and create a subscription

        Lastly, we need to create a subscription for your sink using the Twilio Event Streams Subscription API. A subscription defines which events will be sent to your sink.

        Replace the SinkSid variable with your sink's SID. You can subscribe to one or more event types in a single subscription, check out the available Verify event types here. In this example, we'll subscribe to five different Verify event types.

              
              
              

              Create a New Subscription

              That's it! Once the subscription is created, Verify events will start flowing into your webhook application when they occur.

              Rate this page:

              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 by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

                    
                    
                    

                    Thank you for your feedback!

                    Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                    Sending your feedback...
                    🎉 Thank you for your feedback!
                    Something went wrong. Please try again.

                    Thanks for your feedback!

                    thanks-feedback-gif