VerifyV2Service

Create a new Verification Service.

Changed on

Create a new Verification Service.

post/v2/Services

Request

  • Base URL
    https://verify.twilio.com
  • URL
    https://verify.twilio.com/v2/Services
  • Auth
    • HTTP basic
    • or HTTP bearer

Request body application/x-www-form-urlencoded

FriendlyNamestring required

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.

CodeLengthinteger

The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive.

LookupEnabledboolean

Whether to perform a lookup with each verification started and return info about the phone number.

SkipSmsToLandlinesboolean

Whether to skip sending SMS verifications to landlines. Requires lookup_enabled.

DtmfInputRequiredboolean

Whether to ask the user to press a number before delivering the verify code in a phone call.

TtsNamestring

The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages.

Psd2Enabledboolean

Whether to pass PSD2 transaction parameters when starting a verification.

DoNotShareWarningEnabledboolean

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

CustomCodeEnabledboolean

Whether to allow sending verifications with a custom code instead of a randomly generated one.

Push.IncludeDateboolean

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.

Push.ApnCredentialSidstring

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

Push.FcmCredentialSidstring

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

Totp.Issuerstring

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.TimeStepinteger

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

Totp.CodeLengthinteger

Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6

Totp.Skewinteger

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

DefaultTemplateSidstring

The default message template. Will be used for all SMS verifications unless explicitly overriden. SMS channel only.

Whatsapp.MsgServiceSidstring

The SID of the Messaging Service containing WhatsApp Sender(s) that Verify will use to send WhatsApp messages to your users.

Whatsapp.Fromstring

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.

Passkeys.RelyingParty.Idstring

The Relying Party ID for Passkeys. This is the domain of your application, e.g. example.com. It is used to identify your application when creating Passkeys.

Passkeys.RelyingParty.Namestring

The Relying Party Name for Passkeys. This is the name of your application, e.g. Example App. It is used to identify your application when creating Passkeys.

Passkeys.RelyingParty.Originsstring

The Relying Party Origins for Passkeys. This is the origin of your application, e.g. login.example.com,www.example.com. It is used to identify your application when creating Passkeys, it can have multiple origins split by ,.

Passkeys.AuthenticatorAttachmentstring

The Authenticator Attachment for Passkeys. This is the type of authenticator that will be used to create Passkeys. It can be empty or it can have the values platform, cross-platform or any.

Passkeys.DiscoverableCredentialsstring

Indicates whether credentials must be discoverable by the authenticator. It can be empty or it can have the values required, preferred or discouraged.

Passkeys.UserVerificationstring

The User Verification for Passkeys. This is the type of user verification that will be used to create Passkeys. It can be empty or it can have the values required, preferred or discouraged.

VerifyEventSubscriptionEnabledboolean

Whether to allow verifications from the service to reach the stream-events sinks if configured

Response

Created

sidstring nullable

The unique string that we created to identify the Service resource.

account_sidstring nullable

The SID of the Account that created the Service resource.

friendly_namestring nullable

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. It cannot contain more than 4 (consecutive or non-consecutive) digits. This value should not contain PII.

code_lengthinteger

The length of the verification code to generate.

lookup_enabledboolean nullable

Whether to perform a lookup with each verification started and return info about the phone number.

psd2_enabledboolean nullable

Whether to pass PSD2 transaction parameters when starting a verification.

skip_sms_to_landlinesboolean nullable

Whether to skip sending SMS verifications to landlines. Requires lookup_enabled.

dtmf_input_requiredboolean nullable

Whether to ask the user to press a number before delivering the verify code in a phone call.

tts_namestring nullable

The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages.

do_not_share_warning_enabledboolean nullable

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

custom_code_enabledboolean nullable

Whether to allow sending verifications with a custom code instead of a randomly generated one.

pushunknown
totpunknown
default_template_sidstring nullable
whatsappunknown
passkeysunknown
verify_event_subscription_enabledboolean nullable

Whether to allow verifications from the service to reach the stream-events sinks if configured

date_createdstring date-time nullable

The date and time in GMT when the resource was created specified in RFC 2822 format.

date_updatedstring date-time nullable

The date and time in GMT when the resource was last updated specified in RFC 2822 format.

urlstring uri nullable

The absolute URL of the resource.

linksobject nullable

The URLs of related resources.

Changes

    • info

      the endpoint scheme security access_token_bearer was added to the API

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status