The Verification Check Resource represents a verification validation. This will check whether the user-provided token is correct.
Prerequisites:
These fields are returned in the output JSON response. The type SID<VE>
is a unique ID starting with the letters VE.
sid
type: SID<VE>The unique string that we created to identify the VerificationCheck resource.
^VE[0-9a-fA-F]{32}$
34
34
service_sid
type: SID<VA>The SID of the Service the resource is associated with.
^VA[0-9a-fA-F]{32}$
34
34
account_sid
type: SID<AC>The SID of the Account that created the VerificationCheck resource.
^AC[0-9a-fA-F]{32}$
34
34
channel
type: enum<string>The verification method to use. One of: email
, sms
, whatsapp
, call
, or sna
.
sms
call
email
whatsapp
sna
valid
type: booleanUse "status" instead. Legacy property indicating whether the verification was successful.
amount
type: stringThe amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.
payee
type: stringThe payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.
date_created
type: string<date-time>The ISO 8601 date and time in GMT when the Verification Check resource was created.
date_updated
type: string<date-time>The ISO 8601 date and time in GMT when the Verification Check resource was last updated.
sna_attempts_error_codes
type: arrayList 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
.
POST https://verify.twilio.com/v2/Services/{ServiceSid}/VerificationCheck
Twilio deletes the verification SID once it's:
If any of these occur, verification checks will return a 404 not found error like this:
_10Unable 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.
ServiceSid
type: SID<VA>The SID of the verification Service to create the resource under.
^VA[0-9a-fA-F]{32}$
34
34
To
type: stringThe phone number or email to verify. Either this parameter or the verification_sid
must be specified. Phone numbers must be in E.164 format.
VerificationSid
type: SID<VE>A SID that uniquely identifies the Verification Check. Either this parameter or the to
phone number/email must be specified.
^VE[0-9a-fA-F]{32}$
34
34
Amount
type: stringThe amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.
Payee
type: stringThe payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.
Alternative to checking with a Phone Number
Note the sna_attempts_error_codes property in the response
It is possible for a Silent Network Auth (SNA) Verification Check to show a status
of approved
with error codes listed under sna_attempts_error_codes
. This can happen when a Verification Attempt for the SNA Verification failed and resulted in an error, and then a subsequent Verification Attempt was successful and resulted in the approval.