メニュー

Expand
ページを評価:

Verification Check

The Verification Check Resource represents a verification validation. This will check whether the user-provided token is correct.

必要なもの:

  1. Create a Verification Service
  2. Start a Verification

VerificationCheck Response Properties

These fields are returned in the output JSON response. The type SID<VE> is a unique ID starting with the letters VE.

Resource Properties in REST API format
sid
sid<VE> Not PII

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

service_sid
sid<VA> Not PII

The SID of the Service the resource is associated with.

account_sid
sid<AC> Not PII

The SID of the Account that created the VerificationCheck resource.

to
文字列 PII MTL: 30 DAYS

The phone number or email being verified. Phone numbers must be in E.164 format.

channel
enum:channel Not PII

The verification method to use. One of: email, sms, whatsapp, call, or sna.

status
文字列 Not PII

The status of the verification. Can be: pending, approved, or canceled.

valid
boolean Not PII

Use "status" instead. Legacy property indicating whether the verification was successful.

amount
文字列 PII MTL: 1 DAYS

The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.

payee
文字列 PII MTL: 1 DAYS

The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.

date_created
date_time<iso8601> Not PII

The ISO 8601 date and time in GMT when the Verification Check resource was created.

date_updated
date_time<iso8601> Not PII

The ISO 8601 date and time in GMT when the Verification Check resource was last updated.

sna_attempts_error_codes
object[] Not PII

List of error codes as a result of attempting a verification using the sna channel. The error codes are chronologically ordered, from the first attempt to the latest attempt. This will be an empty list if no errors occured or null if the last channel used wasn't sna.

Check a Verification

post
https://verify.twilio.com/v2/Services/{ServiceSid}/VerificationCheck

Twilio deletes the verification SID once it’s:

  • expired (10 minutes)
  • approved
  • when the max attempts to check a code have been reached

If any of these occur, verification checks will return a 404 not found error like this:

Unable to create record: The requested resource /Services/VAXXXXXXXXXXXXX/VerificationCheck was not found

If you’d like to double check what happened with a given verification - please use the Twilio Console Verify Logs.

These are the available input parameters for checking a verification. The type SID<VE> is a unique ID starting with the letters VE.

パラメーター
Parameters in REST API format
service_sid
Path
post sid<VA> Not PII

The SID of the verification Service to create the resource under.

code
オプション
post 文字列 Not PII

The 4-10 character string being verified.

to
オプション
post 文字列 PII MTL: 30 DAYS

The phone number or email to verify. Either this parameter or the verification_sid must be specified. Phone numbers must be in E.164 format.

verification_sid
オプション
post sid<VE> Not PII

A SID that uniquely identifies the Verification Check. Either this parameter or the to phone number/email must be specified.

amount
オプション
post 文字列 PII MTL: 1 DAYS

The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.

payee
オプション
post 文字列 PII MTL: 1 DAYS

The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.

例 1
        
        
        
        例 2
              
              
              
              例 3
                    
                    
                    
                    Alternative to checking with a Phone Number

                    Check a Verification with a SID

                    Alternative to checking with a Phone Number
                    例 4
                          
                          
                          
                          Note the sna_attempts_error_codes property in the response

                          Check a Silent Network Auth Verification with Error Codes

                          Note the sna_attempts_error_codes property in the response
                          ページを評価:

                          ヘルプが必要ですか?

                          We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

                                
                                
                                

                                フィードバックくださりありがとうございます!

                                Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                                Sending your feedback...
                                🎉 Thank you for your feedback!
                                Something went wrong. Please try again.

                                Thanks for your feedback!

                                Refer us and get $10 in 3 simple steps!

                                ステップ1

                                Get link

                                Get a free personal referral link here

                                ステップ2:

                                Give $10

                                Your user signs up and upgrade using link

                                ステップ3

                                Get $10

                                1,250 free SMSes
                                OR 1,000 free voice mins
                                OR 12,000 chats
                                OR more