NAME

Twilio::Rest::Verify::V2::VerificationAttempt - The VerificationAttempt resource

SYNOPSIS

my $client = Twilio::Rest::Client->new($account_sid, $auth_token);

for my $verification_attempt ($client->verify->v2->verification_attempts->read({}, 20)) {
  ...
}
my $verification_attempt = $client->verify->v2->verification_attempts($sid)->fetch;

DESCRIPTION

This file holds VerificationAttemptList, VerificationAttemptPage, VerificationAttemptContext and VerificationAttemptInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

VerificationAttemptList

Returned by $client->verify->v2->verification_attempts. See also Twilio::ListResource.

read

my @records = $client->verify->v2->verification_attempts->read(\%options, $limit, $page_size);

List all the verification attempts for a given Account. Returns the records as a list, fetching as many pages as it needs.

The options are:

channel

Filter used to query Verification Attempts by communication channel. One of sms, call, email, whatsapp or rbm.

channel_data_to

Destination of a verification. It is phone number in E.164 format.

country

Filter used to query Verification Attempts sent to the specified destination country.

date_created_after

Datetime filter used to consider only Verification Attempts created after this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

date_created_before

Datetime filter used to consider only Verification Attempts created before this datetime on the summary aggregation. Given as GMT in ISO 8601 formatted datetime string: yyyy-MM-dd'T'HH:mm:ss'Z. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

status

Filter used to query Verification Attempts by conversion status. Valid values are UNCONVERTED, for attempts that were not converted, and CONVERTED, for attempts that were confirmed. One of converted or unconverted.

verification_sid

Filter used to return all the Verification Attempts of a single verification. Only attempts of the provided verification SID will be returned.

verify_service_sid

Filter used to query Verification Attempts by verify service. Only attempts of the provided SID will be returned.

stream

my $stream = $client->verify->v2->verification_attempts->stream(\%options, $limit, $page_size);

Takes the same arguments as "read", and returns a Twilio::Stream.

page

my $page = $client->verify->v2->verification_attempts->page(\%options, $page_size, $page_token, $page_number);

Fetches one page, and returns a Twilio::Page.

get_page

my $page = $client->verify->v2->verification_attempts->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->verify->v2->verification_attempts->get_context($sid);

Returns a VerificationAttemptContext, and makes no request.

VerificationAttemptPage

A Twilio::Page of VerificationAttemptInstance objects.

records_key

build_instance

Used by Twilio::Page.

VerificationAttemptContext

Returned by $client->verify->v2->verification_attempts($sid). It makes no request until one of these methods is called.

fetch

my $verification_attempt = $client->verify->v2->verification_attempts($sid)->fetch;

Fetch a specific verification attempt. Returns a VerificationAttemptInstance.

VerificationAttemptInstance

See also Twilio::InstanceResource.

It has fetch, which work as they do on the context.

Its fields are:

account_sid

The SID of the Account that created the Verification resource.

channel

One of sms, call, email, whatsapp or rbm.

channel_data

An object containing the channel specific information for an attempt.

conversion_status

One of converted or unconverted.

date_created

The date that this Attempt was created, given in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

The date that this Attempt was updated, given in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

price

An object containing the charge for this verification attempt related to the channel costs and the currency used. The costs related to the succeeded verifications are not included. May not be immediately available. More information on pricing is available here.

service_sid

The SID of the Service used to generate the attempt.

sid

The SID that uniquely identifies the verification attempt resource.

url

No description in the specification.

verification_sid

The SID of the Verification that generated the attempt.

CONSTRUCTORS

new

Objects here come from the methods above, so there is no need to call new directly.

LICENSE

Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.