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:
If you later decide to re-enable Verify Events, see the Verify Events Onboarding Guide.
You can complete the offboarding process entirely in Twilio Console. No code or command-line work is required.
- Go to Twilio Console > Event Streams > Sinks.
- Locate the subscription that routes Verify Events to your sink.
- Open the subscription, choose Choose event types, find the Verify section, and clear the event types that you no longer want delivered.
- If the subscription is used only for Verify Events, select Delete subscription. Verify Events stop being delivered to the webhook endpoint.
If the sink was created only for Verify Events, you can delete it after you update or remove the subscription.
- In Twilio Console > Event Streams > Sinks, select the sink.
- 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.
- Open Twilio Console > Verify > Services and select the Service.
- 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.
This method uses the Twilio Event Streams API with a Twilio SDK, Twilio CLI, or cURL.
- Note your Account SID and Auth Token from the Twilio Console. You use these credentials to authenticate API requests.
- Record the Subscription SID that you intend to delete.
- If you plan to delete the sink, also record the Sink SID.
Delete the subscription by calling the Event Streams Subscription API.
Replace the Sid path parameter with the Subscription SID.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function deleteSubscription() {11await client.events.v112.subscriptions("DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.remove();14}1516deleteSubscription();
After the subscription is deleted, Verify Events stop flowing to the destination.
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/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function deleteSink() {11await client.events.v1.sinks("DGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").remove();12}1314deleteSink();
If other subscriptions use the sink, do not delete it.
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/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function updateService() {11const service = await client.verify.v212.services("VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.update({ verifyEventSubscriptionEnabled: false });1415console.log(service.verifyEventSubscriptionEnabled);16}1718updateService();
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": 223},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": null33},34"authenticator_attachment": null,35"discoverable_credentials": null,36"user_verification": null37},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.