Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

Verify Events offboarding guide


Verify Events provides real-time information about activity in your Verify Service by streaming Verify interactions.

This guide explains how to stop receiving Verify Events through two methods:

  • Twilio Console
  • Event Streams API

If you later decide to re-enable Verify Events, see the Verify Events Onboarding Guide.


Offboarding with Twilio Console

offboarding-with-twilio-console page anchor

You can complete the offboarding process entirely in Twilio Console. No code or command-line work is required.

Step 1: Remove or disable your subscription

step-1-remove-or-disable-your-subscription page anchor
  1. Go to Twilio Console > Event Streams > Sinks(link takes you to an external page).
  2. Locate the subscription that routes Verify Events to your sink.
  3. Open the subscription, choose Choose event types, find the Verify section, and clear the event types that you no longer want delivered.
  4. If the subscription is used only for Verify Events, select Delete subscription. Verify Events stop being delivered to the webhook endpoint.

Step 2: Remove the sink if you no longer need it

step-2-remove-the-sink-if-you-no-longer-need-it page anchor

If the sink was created only for Verify Events, you can delete it after you update or remove the subscription.

  1. In Twilio Console > Event Streams > Sinks(link takes you to an external page), select the sink.
  2. Choose Delete. Deleting the sink also deletes its associated subscription.

If the sink is shared with other subscriptions, keep the sink and remove only the Verify event types from the subscription.

Step 3: Turn off Verify Events for the Service

step-3-turn-off-verify-events-for-the-service page anchor
  1. Open Twilio Console > Verify > Services(link takes you to an external page) and select the Service.
  2. On the Service settings page, open the General tab and turn off the Verify Events subscribed service option.

Disabling the option completes the offboarding flow and marks the Service as no longer configured for Verify Events.


Offboarding with Event Streams API

offboarding-with-event-streams-api page anchor

This method uses the Twilio Event Streams API with a Twilio SDK, Twilio CLI, or cURL.

Step 1: Gather required SIDs

step-1-gather-required-sids page anchor
  1. Note your Account SID and Auth Token from the Twilio Console(link takes you to an external page). You use these credentials to authenticate API requests.
  2. Record the Subscription SID that you intend to delete.
  3. If you plan to delete the sink, also record the Sink SID.

Step 2: Delete the subscription

step-2-delete-the-subscription page anchor

Delete the subscription by calling the Event Streams Subscription API. Replace the Sid path parameter with the Subscription SID.

Delete a subscriptionLink to code sample: Delete a subscription
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function deleteSubscription() {
11
await client.events.v1
12
.subscriptions("DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.remove();
14
}
15
16
deleteSubscription();

After the subscription is deleted, Verify Events stop flowing to the destination.

Step 3: Delete the sink if you no longer need it

step-3-delete-the-sink-if-you-no-longer-need-it page anchor

If the sink is not used by any other subscriptions, delete it by calling the Event Streams Sink API. Replace the Sid path parameter with the Sink SID.

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function deleteSink() {
11
await client.events.v1.sinks("DGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").remove();
12
}
13
14
deleteSink();

If other subscriptions use the sink, do not delete it.

Step 4: Turn off Verify Events for the Service

step-4-turn-off-verify-events-for-the-service page anchor

Disable Verify Events for the Service either in Twilio Console (see Step 3 above) or by updating the Service with the Verify API.

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function updateService() {
11
const service = await client.verify.v2
12
.services("VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.update({ verifyEventSubscriptionEnabled: false });
14
15
console.log(service.verifyEventSubscriptionEnabled);
16
}
17
18
updateService();

Response

Note about this response
1
{
2
"sid": "VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"friendly_name": "name",
5
"code_length": 4,
6
"lookup_enabled": false,
7
"psd2_enabled": false,
8
"skip_sms_to_landlines": false,
9
"dtmf_input_required": false,
10
"tts_name": "name",
11
"do_not_share_warning_enabled": false,
12
"custom_code_enabled": true,
13
"push": {
14
"include_date": false,
15
"apn_credential_sid": null,
16
"fcm_credential_sid": "CRbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
17
},
18
"totp": {
19
"issuer": "test-issuer",
20
"time_step": 30,
21
"code_length": 3,
22
"skew": 2
23
},
24
"whatsapp": {
25
"msg_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
26
"from": "whatsapp:+1234567890"
27
},
28
"passkeys": {
29
"relying_party": {
30
"id": null,
31
"name": null,
32
"origins": null
33
},
34
"authenticator_attachment": null,
35
"discoverable_credentials": null,
36
"user_verification": null
37
},
38
"default_template_sid": "HJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
39
"verify_event_subscription_enabled": false,
40
"date_created": "2015-07-30T20:00:00Z",
41
"date_updated": "2015-07-30T20:00:00Z",
42
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
43
"links": {
44
"verification_checks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/VerificationCheck",
45
"verifications": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications",
46
"rate_limits": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RateLimits",
47
"messaging_configurations": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/MessagingConfigurations",
48
"entities": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities",
49
"webhooks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks",
50
"access_tokens": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AccessTokens"
51
}
52
}

This request sets the VerifyEventSubscriptionEnabled property to false (see the Verify Service API documentation), ensuring that the Service is no longer configured for Verify Events.