A Verification Service is the set of common configurations used to create and check verifications. You can create a service with the API or in the Console. Services include configuration for features like:
The SMS channel example below shows different friendly names and code lengths used in our SMS message templates.
Follow along with the instructions here to set up your service to send email verifications.
These fields are returned in the output JSON response. The type SID<VA>
is a unique ID starting with the letters VA.
The unique string that we created to identify the Service resource.
^VA[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Account that created the Service resource.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The name that appears in the body of your verification messages. It can be up to 30 characters long and can include letters, numbers, spaces, dashes, underscores. Phone numbers, special characters or links are NOT allowed. This value should not contain PII.
Whether to perform a lookup with each verification started and return info about the phone number.
Whether to pass PSD2 transaction parameters when starting a verification.
Whether to skip sending SMS verifications to landlines. Requires lookup_enabled
.
Whether to ask the user to press a number before delivering the verify code in a phone call.
The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages.
Whether to add a security warning at the end of an SMS verification body. Disabled by default and applies only to SMS. Example SMS body: Your AppName verification code is: 1234. Don’t share this code with anyone; our employees will never ask for the code
Whether to allow sending verifications with a custom code instead of a randomly generated one.
Whether to allow verifications from the service to reach the stream-events sinks if configured
The date and time in GMT when the resource was created specified in RFC 2822 format.
The date and time in GMT when the resource was last updated specified in RFC 2822 format.
The URLs of related resources.
POST https://verify.twilio.com/v2/Services
These are the available input parameters for creating a Service.
application/x-www-form-urlencoded
A descriptive string that you create to describe the verification service. It can be up to 32 characters long. This value should not contain PII.
The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive.
Whether to perform a lookup with each verification started and return info about the phone number.
Whether to skip sending SMS verifications to landlines. Requires lookup_enabled
.
Whether to ask the user to press a number before delivering the verify code in a phone call.
The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages.
Whether to pass PSD2 transaction parameters when starting a verification.
Whether to add a security warning at the end of an SMS verification body. Disabled by default and applies only to SMS. Example SMS body: Your AppName verification code is: 1234. Don’t share this code with anyone; our employees will never ask for the code
Whether to allow sending verifications with a custom code instead of a randomly generated one.
Optional configuration for the Push factors. If true, include the date in the Challenge's response. Otherwise, the date is omitted from the response. See Challenge resource’s details parameter for more info. Default: false. Deprecated do not use this parameter. This timestamp value is the same one as the one found in date_created
, please use that one instead.
Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See Credential Resource
^CR[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See Credential Resource
^CR[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
Optional configuration for the TOTP factors. Set TOTP Issuer for this service. This will allow to configure the issuer of the TOTP URI. Defaults to the service friendly name if not provided.
Optional configuration for the TOTP factors. Defines how often, in seconds, are TOTP codes generated. i.e, a new TOTP code is generated every time_step seconds. Must be between 20 and 60 seconds, inclusive. Defaults to 30 seconds
Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6
Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1
The default message template. Will be used for all SMS verifications unless explicitly overriden. SMS channel only.
^HJ[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Messaging Service containing WhatsApp Sender(s) that Verify will use to send WhatsApp messages to your users.
^MG[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The number to use as the WhatsApp Sender that Verify will use to send WhatsApp messages to your users.This WhatsApp Sender must be associated with a Messaging Service SID.
Whether to allow verifications from the service to reach the stream-events sinks if configured
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 createService() {11const service = await client.verify.v2.services.create({12friendlyName: "My Verify Service",13});1415console.log(service.sid);16}1718createService();
1{2"sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"friendly_name": "My Verify Service",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"mailer_sid": "MDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",12"do_not_share_warning_enabled": false,13"custom_code_enabled": true,14"push": {15"include_date": false,16"apn_credential_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",17"fcm_credential_sid": null18},19"totp": {20"issuer": "test-issuer",21"time_step": 30,22"code_length": 3,23"skew": 224},25"whatsapp": {26"msg_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",27"from": "whatsapp:+1234567890"28},29"default_template_sid": "HJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",30"verify_event_subscription_enabled": false,31"date_created": "2015-07-30T20:00:00Z",32"date_updated": "2015-07-30T20:00:00Z",33"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",34"links": {35"verification_checks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/VerificationCheck",36"verifications": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications",37"rate_limits": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RateLimits",38"messaging_configurations": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/MessagingConfigurations",39"entities": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities",40"webhooks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks",41"access_tokens": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AccessTokens"42}43}
A predefined template (public or private if there are any associated with your account) can be associated with a Verification Service by setting the DefaultTemplateSid
attribute. By doing so, the message body of the verifications created with the service will use the text defined in the referenced template by default.
The default template SID<HJ>
is a unique ID starting with the letters HJ
. It is automatically generated when the template is created.
A complete list of the available templates for the account can be obtained by querying the Templates API.
The template that is going to be used in the verification will be selected in the following order:
TemplateSid
is received in the Create Verification request, the verification will use the text defined in the template identified with that Sid
.DefaultTemplateSid
is set for the Service, the verification will use the text defined in the template identified with that 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 createService() {11const service = await client.verify.v2.services.create({12defaultTemplateSid: "HJXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",13friendlyName: "My Verify Service",14});1516console.log(service.sid);17}1819createService();
1{2"sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"friendly_name": "My Verify Service",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"mailer_sid": "MDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",12"do_not_share_warning_enabled": false,13"custom_code_enabled": true,14"push": {15"include_date": false,16"apn_credential_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",17"fcm_credential_sid": null18},19"totp": {20"issuer": "test-issuer",21"time_step": 30,22"code_length": 3,23"skew": 224},25"whatsapp": {26"msg_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",27"from": "whatsapp:+1234567890"28},29"default_template_sid": "HJXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",30"verify_event_subscription_enabled": false,31"date_created": "2015-07-30T20:00:00Z",32"date_updated": "2015-07-30T20:00:00Z",33"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",34"links": {35"verification_checks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/VerificationCheck",36"verifications": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications",37"rate_limits": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RateLimits",38"messaging_configurations": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/MessagingConfigurations",39"entities": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities",40"webhooks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks",41"access_tokens": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AccessTokens"42}43}
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 createService() {11const service = await client.verify.v2.services.create({12friendlyName: "Owl Banking",13psd2Enabled: true,14});1516console.log(service.psd2Enabled);17}1819createService();
1{2"sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"friendly_name": "Owl Banking",5"code_length": 4,6"lookup_enabled": false,7"psd2_enabled": true,8"skip_sms_to_landlines": false,9"dtmf_input_required": false,10"tts_name": "name",11"mailer_sid": "MDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",12"do_not_share_warning_enabled": false,13"custom_code_enabled": true,14"push": {15"include_date": false,16"apn_credential_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",17"fcm_credential_sid": null18},19"totp": {20"issuer": "test-issuer",21"time_step": 30,22"code_length": 3,23"skew": 224},25"whatsapp": {26"msg_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",27"from": "whatsapp:+1234567890"28},29"default_template_sid": "HJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",30"verify_event_subscription_enabled": false,31"date_created": "2015-07-30T20:00:00Z",32"date_updated": "2015-07-30T20:00:00Z",33"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",34"links": {35"verification_checks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/VerificationCheck",36"verifications": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications",37"rate_limits": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RateLimits",38"messaging_configurations": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/MessagingConfigurations",39"entities": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities",40"webhooks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks",41"access_tokens": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AccessTokens"42}43}
See Verifying Transactions for PSD2 for more information.
GET https://verify.twilio.com/v2/Services/{Sid}
The Twilio-provided string that uniquely identifies the Verification Service resource to fetch.
^VA[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
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 fetchService() {11const service = await client.verify.v212.services("VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.fetch();1415console.log(service.sid);16}1718fetchService();
1{2"sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",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"mailer_sid": "MDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",12"do_not_share_warning_enabled": false,13"custom_code_enabled": true,14"push": {15"include_date": false,16"apn_credential_sid": null,17"fcm_credential_sid": null18},19"totp": {20"issuer": null,21"time_step": null,22"code_length": null,23"skew": null24},25"whatsapp": {26"msg_service_sid": null,27"from": null28},29"default_template_sid": "HJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",30"verify_event_subscription_enabled": false,31"date_created": "2015-07-30T20:00:00Z",32"date_updated": "2015-07-30T20:00:00Z",33"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",34"links": {35"verification_checks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/VerificationCheck",36"verifications": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications",37"rate_limits": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RateLimits",38"messaging_configurations": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/MessagingConfigurations",39"entities": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities",40"webhooks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks",41"access_tokens": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AccessTokens"42}43}
GET https://verify.twilio.com/v2/Services
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Maximum: 1000
The page token. This is provided by the 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 listService() {11const services = await client.verify.v2.services.list({ limit: 20 });1213services.forEach((s) => console.log(s.sid));14}1516listService();
1{2"meta": {3"page": 0,4"page_size": 50,5"first_page_url": "https://verify.twilio.com/v2/Services?PageSize=50&Page=0",6"previous_page_url": null,7"next_page_url": null,8"key": "services",9"url": "https://verify.twilio.com/v2/Services?PageSize=50&Page=0"10},11"services": [12{13"sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",14"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",15"friendly_name": "name",16"code_length": 4,17"lookup_enabled": false,18"psd2_enabled": false,19"skip_sms_to_landlines": false,20"dtmf_input_required": false,21"tts_name": "name",22"mailer_sid": "MDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",23"do_not_share_warning_enabled": false,24"custom_code_enabled": true,25"push": {26"include_date": false,27"apn_credential_sid": null,28"fcm_credential_sid": null29},30"totp": {31"issuer": null,32"time_step": null,33"code_length": null,34"skew": null35},36"whatsapp": {37"msg_service_sid": null,38"from": null39},40"default_template_sid": "HJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",41"verify_event_subscription_enabled": false,42"date_created": "2015-07-30T20:00:00Z",43"date_updated": "2015-07-30T20:00:00Z",44"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",45"links": {46"verification_checks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/VerificationCheck",47"verifications": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications",48"rate_limits": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RateLimits",49"messaging_configurations": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/MessagingConfigurations",50"entities": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities",51"webhooks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks",52"access_tokens": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AccessTokens"53}54}55]56}
POST https://verify.twilio.com/v2/Services/{Sid}
These are the available input parameters for updating a Service. The type SID<VA>
is a unique ID starting with the letters VA.
The Twilio-provided string that uniquely identifies the Service resource to update.
^VA[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
application/x-www-form-urlencoded
A descriptive string that you create to describe the verification service. It can be up to 32 characters long. This value should not contain PII.
The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive.
Whether to perform a lookup with each verification started and return info about the phone number.
Whether to skip sending SMS verifications to landlines. Requires lookup_enabled
.
Whether to ask the user to press a number before delivering the verify code in a phone call.
The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages.
Whether to pass PSD2 transaction parameters when starting a verification.
Whether to add a privacy warning at the end of an SMS. Disabled by default and applies only for SMS.
Whether to allow sending verifications with a custom code instead of a randomly generated one.
Optional configuration for the Push factors. If true, include the date in the Challenge's response. Otherwise, the date is omitted from the response. See Challenge resource’s details parameter for more info. Default: false. Deprecated do not use this parameter.
Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See Credential Resource
^CR[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See Credential Resource
^CR[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
Optional configuration for the TOTP factors. Set TOTP Issuer for this service. This will allow to configure the issuer of the TOTP URI.
Optional configuration for the TOTP factors. Defines how often, in seconds, are TOTP codes generated. i.e, a new TOTP code is generated every time_step seconds. Must be between 20 and 60 seconds, inclusive. Defaults to 30 seconds
Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6
Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1
The default message template. Will be used for all SMS verifications unless explicitly overriden. SMS channel only.
^HJ[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Messaging Service to associate with the Verification Service.
^MG[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The WhatsApp number to use as the sender of the verification messages. This number must be associated with the WhatsApp Message Service.
Whether to allow verifications from the service to reach the stream-events sinks if configured
A predefined template can be associated with an already created Verification Service by setting the DefaultTemplateSid
attribute. By doing so, the message body of the verifications created with the service will use by default the text defined in the template.
The default template SID<HJ>
is a unique ID starting with the letters HJ
. It is generated when the template is created.
A complete list of the available templates for the account can be obtained by querying the List Templates API.
The template that is going to be used in the verification will be defined following this order:
TemplateSid
is received in the Create Verification request, the verification will use the text defined in the template identified with that Sid
.DefaultTemplateSid
is set for the Service, the verification will use the text defined in the template identified with that Sid
.1curl -X POST https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \2--data-urlencode "DefaultTemplateSid=HJXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \3-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
1{2"sid": "VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",3"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",4"friendly_name": "name",5"code_length": 7,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": true,15"apn_credential_sid": null,16"fcm_credential_sid": "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"17},18"totp": {19"issuer": "test-issuer",20"time_step": 30,21"code_length": 3,22"skew": 223},24"date_created": "2015-07-30T20:00:00Z",25"date_updated": "2015-07-30T20:00:00Z",26"url": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",27"links": {28"verification_checks": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/VerificationCheck",29"verifications": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Verifications",30"rate_limits": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/RateLimits",31"messaging_configurations": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/MessagingConfigurations",32"entities": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities",33"webhooks": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Webhooks",34"access_tokens": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AccessTokens"35}36}
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("VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.update({ codeLength: 7 });1415console.log(service.codeLength);16}1718updateService();
1{2"sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"friendly_name": "name",5"code_length": 7,6"lookup_enabled": false,7"psd2_enabled": false,8"skip_sms_to_landlines": false,9"dtmf_input_required": false,10"tts_name": "name",11"mailer_sid": "MDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",12"do_not_share_warning_enabled": false,13"custom_code_enabled": true,14"push": {15"include_date": false,16"apn_credential_sid": null,17"fcm_credential_sid": "CRbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"18},19"totp": {20"issuer": "test-issuer",21"time_step": 30,22"code_length": 3,23"skew": 224},25"whatsapp": {26"msg_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",27"from": "whatsapp:+1234567890"28},29"default_template_sid": "HJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",30"verify_event_subscription_enabled": false,31"date_created": "2015-07-30T20:00:00Z",32"date_updated": "2015-07-30T20:00:00Z",33"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",34"links": {35"verification_checks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/VerificationCheck",36"verifications": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications",37"rate_limits": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RateLimits",38"messaging_configurations": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/MessagingConfigurations",39"entities": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities",40"webhooks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks",41"access_tokens": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AccessTokens"42}43}
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("VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.update({ friendlyName: "New and Improved Service Name" });1415console.log(service.friendlyName);16}1718updateService();
1{2"sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"friendly_name": "New and Improved Service 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"mailer_sid": "MDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",12"do_not_share_warning_enabled": false,13"custom_code_enabled": true,14"push": {15"include_date": false,16"apn_credential_sid": null,17"fcm_credential_sid": "CRbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"18},19"totp": {20"issuer": "test-issuer",21"time_step": 30,22"code_length": 3,23"skew": 224},25"whatsapp": {26"msg_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",27"from": "whatsapp:+1234567890"28},29"default_template_sid": "HJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",30"verify_event_subscription_enabled": false,31"date_created": "2015-07-30T20:00:00Z",32"date_updated": "2015-07-30T20:00:00Z",33"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",34"links": {35"verification_checks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/VerificationCheck",36"verifications": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications",37"rate_limits": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RateLimits",38"messaging_configurations": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/MessagingConfigurations",39"entities": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities",40"webhooks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks",41"access_tokens": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AccessTokens"42}43}
DELETE https://verify.twilio.com/v2/Services/{Sid}
The Twilio-provided string that uniquely identifies the Verification Service resource to delete.
^VA[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
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 deleteService() {11await client.verify.v212.services("VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.remove();14}1516deleteService();