NAME
Twilio::Rest::Verify::V2::Service::Entity::Factor - The Factor resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
for my $factor ($client->verify->v2->services($service_sid)->entities($identity)->factors->read({}, 20)) {
...
}
my $factor = $client->verify->v2->services($service_sid)->entities($identity)->factors($sid)->fetch;
$client->verify->v2->services($service_sid)->entities($identity)->factors($sid)->update(\%options);
$client->verify->v2->services($service_sid)->entities($identity)->factors($sid)->delete;
DESCRIPTION
This file holds FactorList, FactorPage, FactorContext and FactorInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
FactorList
Returned by $client->verify->v2->services($service_sid)->entities($identity)->factors. See also Twilio::ListResource.
read
my @records = $client->verify->v2->services($service_sid)->entities($identity)->factors->read(\%options, $limit, $page_size);
Retrieve a list of all Factors for an Entity. Returns the records as a list, fetching as many pages as it needs.
stream
my $stream = $client->verify->v2->services($service_sid)->entities($identity)->factors->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->verify->v2->services($service_sid)->entities($identity)->factors->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->verify->v2->services($service_sid)->entities($identity)->factors->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->verify->v2->services($service_sid)->entities($identity)->factors->get_context($sid);
Returns a FactorContext, and makes no request.
FactorPage
A Twilio::Page of FactorInstance objects.
records_key
build_instance
Used by Twilio::Page.
FactorContext
Returned by $client->verify->v2->services($service_sid)->entities($identity)->factors($sid). It makes no request until one of these methods is called.
fetch
my $factor = $client->verify->v2->services($service_sid)->entities($identity)->factors($sid)->fetch;
Fetch a specific Factor. Returns a FactorInstance.
update
my $factor = $client->verify->v2->services($service_sid)->entities($identity)->factors($sid)->update(\%options);
Update a specific Factor. This endpoint can be used to Verify a Factor if passed an AuthPayload param. Returns a FactorInstance.
The options are:
auth_payload-
The optional payload needed to verify the Factor for the first time. E.g. for a TOTP, the numeric code.
config_alg-
One of
sha1,sha256orsha512. config_code_length-
Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive
config_notification_platform-
The transport technology used to generate the Notification Token. Can be
apn,fcmornone. Required whenfactor_typeispush. config_notification_token-
For APN, the device token. For FCM, the registration token. It is used to send the push notifications. Required when
factor_typeispush. If specified, this value must be between 32 and 255 characters long. config_sdk_version-
The Verify Push SDK version used to configure the factor
config_skew-
The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive
config_time_step-
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
friendly_name-
The new friendly name of this Factor. It can be up to 64 characters.
delete
$client->verify->v2->services($service_sid)->entities($identity)->factors($sid)->delete;
Delete a specific Factor. Returns true.
FactorInstance
See also Twilio::InstanceResource.
It has fetch, update and delete, which work as they do on the context.
Its fields are:
- account_sid
-
The unique SID identifier of the Account.
- config
-
An object that contains configurations specific to a
factor_type. - date_created
-
The date that this Factor 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 Factor was updated, given in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- entity_sid
-
The unique SID identifier of the Entity.
- factor_type
-
One of
push,totporpasskeys. - friendly_name
-
A human readable description of this resource, up to 64 characters. For a push factor, this can be the device's name.
- identity
-
Customer unique identity for the Entity owner of the Factor. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
- metadata
-
Custom metadata associated with the factor. This is added by the Device/SDK directly to allow for the inclusion of device information. It must be a stringified JSON with only strings values eg.
{"os": "Android"}. Can be up to 1024 characters in length. Forpasskeysfactors, it contains theaaguidof the authenticator once the factor is verified, anddate_last_approved(ISO 8601) once the factor has been used to approve a challenge. - service_sid
-
The unique SID identifier of the Service.
- sid
-
A 34 character string that uniquely identifies this Factor.
- status
-
One of
unverifiedorverified. - url
-
The URL of this resource.
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.