Services
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:
- メール
- Friendly Name (used in the Verification message templates)
- Code Length
- Skip sending SMS to Landlines
- Requiring DTMF Input for Voice Verifications
- Enabling Twilio Lookup
The SMS channel example below shows different friendly names and code lengths used in our SMS message templates.
Email Verification
Follow along with the instructions here to set up your service to send email verifications.
Service Response Properties
These fields are returned in the output JSON response. The type SID<VA>
is a unique ID starting with the letters VA.
Resource Properties in REST API format | |
---|---|
sid
|
The unique string that we created to identify the Service resource. |
account_sid
|
The SID of the Account that created the Service resource. |
friendly_name
|
The string that you assigned to describe the verification service. This value should not contain PII. |
code_length
|
The length of the verification code to generate. |
lookup_enabled
|
Whether to perform a lookup with each verification started and return info about the phone number. |
psd2_enabled
|
Whether to pass PSD2 transaction parameters when starting a verification. |
skip_sms_to_landlines
|
Whether to skip sending SMS verifications to landlines. Requires |
dtmf_input_required
|
Whether to ask the user to press a number before delivering the verify code in a phone call. |
tts_name
|
The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. |
do_not_share_warning_enabled
|
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: |
custom_code_enabled
|
Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. |
push
|
Configurations for the Push factors (channel) created under this Service. |
date_created
|
The date and time in GMT when the resource was created specified in RFC 2822 format. |
date_updated
|
The date and time in GMT when the resource was last updated specified in RFC 2822 format. |
url
|
The absolute URL of the resource. |
links
|
The URLs of related resources. |
Create a Verification Service
https://verify.twilio.com/v2/Services
These are the available input parameters for creating a Service.
パラメーター
Parameters in REST API format | |
---|---|
friendly_name
必須
|
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. |
code_length
オプション
|
The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. |
lookup_enabled
オプション
|
Whether to perform a lookup with each verification started and return info about the phone number. |
skip_sms_to_landlines
オプション
|
Whether to skip sending SMS verifications to landlines. Requires |
dtmf_input_required
オプション
|
Whether to ask the user to press a number before delivering the verify code in a phone call. |
tts_name
オプション
|
The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. |
psd2_enabled
オプション
|
Whether to pass PSD2 transaction parameters when starting a verification. |
do_not_share_warning_enabled
オプション
|
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: |
custom_code_enabled
オプション
|
Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. |
push.include_date
オプション
|
Optional configuration for the Push factors. If true, include the date in the Challenge's reponse. Otherwise, the date is omitted from the response. See Challenge resource’s details parameter for more info. Default: true |
push.apn_credential_sid
オプション
|
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.fcm_credential_sid
オプション
|
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 |
例 1
例 2
See Verifying Transactions for PSD2 for more information.
Fetch a Service
https://verify.twilio.com/v2/Services/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The Twilio-provided string that uniquely identifies the Verification Service resource to fetch. |
例 1
全Serviceを一覧する
https://verify.twilio.com/v2/Services
例 1
Serviceを更新する
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.
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The Twilio-provided string that uniquely identifies the Service resource to update. |
friendly_name
オプション
|
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. |
code_length
オプション
|
The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. |
lookup_enabled
オプション
|
Whether to perform a lookup with each verification started and return info about the phone number. |
skip_sms_to_landlines
オプション
|
Whether to skip sending SMS verifications to landlines. Requires |
dtmf_input_required
オプション
|
Whether to ask the user to press a number before delivering the verify code in a phone call. |
tts_name
オプション
|
The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. |
psd2_enabled
オプション
|
Whether to pass PSD2 transaction parameters when starting a verification. |
do_not_share_warning_enabled
オプション
|
Whether to add a privacy warning at the end of an SMS. Disabled by default and applies only for SMS. |
custom_code_enabled
オプション
|
Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. |
push.include_date
オプション
|
Optional configuration for the Push factors. If true, include the date in the Challenge's reponse. Otherwise, the date is omitted from the response. See Challenge resource’s details parameter for more info. Default: true |
push.apn_credential_sid
オプション
|
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.fcm_credential_sid
オプション
|
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 |
例 1
例 2
Serviceを削除する
https://verify.twilio.com/v2/Services/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The Twilio-provided string that uniquely identifies the Verification Service resource to delete. |
例 1
ヘルプが必要ですか?
誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。