Create a new Verification Service
TODO: Resource-level docs
Create a new Verification Service.
Body
-
CodeLength integer
The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive.
-
CustomCodeEnabled boolean
Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers.
-
DefaultTemplateSid string
The default message template. Will be used for all SMS verifications unless explicitly overriden. SMS channel only.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^HJ[0-9a-fA-F]{32}$
. -
DtmfInputRequired boolean
Whether to ask the user to press a number before delivering the verify code in a phone call.
-
A descriptive string that you create to describe the verification service. It can be up to 30 characters long. This value should not contain PII.
-
LookupEnabled boolean
Whether to perform a lookup with each verification started and return info about the phone number.
-
Psd2Enabled boolean
Whether to pass PSD2 transaction parameters when starting a verification.
-
Push.ApnCredentialSid string
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
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^CR[0-9a-fA-F]{32}$
. -
Push.FcmCredentialSid string
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
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^CR[0-9a-fA-F]{32}$
. -
Push.IncludeDate boolean
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. -
SkipSmsToLandlines boolean
Whether to skip sending SMS verifications to landlines. Requires
lookup_enabled
. -
Totp.CodeLength integer
Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6
-
Totp.Issuer string
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.
-
Totp.Skew integer
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
-
Totp.TimeStep integer
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
-
TtsName string
The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages.
curl \
-X POST https://verify.twilio.com/v2/Services \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'CodeLength=42&CustomCodeEnabled=true&DefaultTemplateSid=string&DoNotShareWarningEnabled=true&DtmfInputRequired=true&FriendlyName=string&LookupEnabled=true&Psd2Enabled=true&Push.ApnCredentialSid=string&Push.FcmCredentialSid=string&Push.IncludeDate=true&SkipSmsToLandlines=true&Totp.CodeLength=42&Totp.Issuer=string&Totp.Skew=42&Totp.TimeStep=42&TtsName=string'
{
"CodeLength": 42,
"CustomCodeEnabled": true,
"DefaultTemplateSid": "string",
"DoNotShareWarningEnabled": true,
"DtmfInputRequired": true,
"FriendlyName": "string",
"LookupEnabled": true,
"Psd2Enabled": true,
"Push.ApnCredentialSid": "string",
"Push.FcmCredentialSid": "string",
"Push.IncludeDate": true,
"SkipSmsToLandlines": true,
"Totp.CodeLength": 42,
"Totp.Issuer": "string",
"Totp.Skew": 42,
"Totp.TimeStep": 42,
"TtsName": "string"
}
{
"CodeLength": 42,
"CustomCodeEnabled": true,
"DefaultTemplateSid": "string",
"DoNotShareWarningEnabled": true,
"DtmfInputRequired": true,
"FriendlyName": "string",
"LookupEnabled": true,
"Psd2Enabled": true,
"Push.ApnCredentialSid": "string",
"Push.FcmCredentialSid": "string",
"Push.IncludeDate": true,
"SkipSmsToLandlines": true,
"Totp.CodeLength": 42,
"Totp.Issuer": "string",
"Totp.Skew": 42,
"Totp.TimeStep": 42,
"TtsName": "string"
}
{
"account_sid": "string",
"code_length": 42,
"custom_code_enabled": true,
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"default_template_sid": "string",
"do_not_share_warning_enabled": true,
"dtmf_input_required": true,
"friendly_name": "string",
"links": {},
"lookup_enabled": true,
"psd2_enabled": true,
"sid": "string",
"skip_sms_to_landlines": true,
"tts_name": "string",
"url": "https://example.com"
}
{
"account_sid": "string",
"code_length": 42,
"custom_code_enabled": true,
"date_created": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"default_template_sid": "string",
"do_not_share_warning_enabled": true,
"dtmf_input_required": true,
"friendly_name": "string",
"links": {},
"lookup_enabled": true,
"psd2_enabled": true,
"sid": "string",
"skip_sms_to_landlines": true,
"tts_name": "string",
"url": "https://example.com"
}