NAME
Twilio::Rest::Verify::V2::Service::AccessToken - The AccessToken resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $access_token = $client->verify->v2->services($service_sid)->access_tokens->create($identity, $factor_type, \%options);
my $access_token = $client->verify->v2->services($service_sid)->access_tokens($sid)->fetch;
DESCRIPTION
This file holds AccessTokenList, AccessTokenContext and AccessTokenInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
AccessTokenList
Returned by $client->verify->v2->services($service_sid)->access_tokens. See also Twilio::ListResource.
create
my $access_token = $client->verify->v2->services($service_sid)->access_tokens->create($identity, $factor_type, \%options);
Create a new enrollment Access Token for the Entity. Returns a AccessTokenInstance.
The required values are:
$identity-
The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID.
$factor_type-
Must be
push.
The options are:
factor_friendly_name-
The friendly name of the factor that is going to be created with this access token
ttl-
How long, in seconds, the access token is valid. Can be an integer between 60 and 300. Default is 60.
get_context
my $context = $client->verify->v2->services($service_sid)->access_tokens->get_context($sid);
Returns a AccessTokenContext, and makes no request.
AccessTokenContext
Returned by $client->verify->v2->services($service_sid)->access_tokens($sid). It makes no request until one of these methods is called.
fetch
my $access_token = $client->verify->v2->services($service_sid)->access_tokens($sid)->fetch;
Fetch an Access Token for the Entity. Returns a AccessTokenInstance.
AccessTokenInstance
See also Twilio::InstanceResource.
It has fetch, which work as they do on the context.
Its fields are:
- account_sid
-
The unique SID identifier of the Account.
- date_created
-
The date that this access token was created, given in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- entity_identity
-
The unique external identifier for the Entity of the Service.
- factor_friendly_name
-
A human readable description of this factor, up to 64 characters. For a push factor, this can be the device's name.
- factor_type
-
Must be
push. - service_sid
-
The unique SID identifier of the Verify Service.
- sid
-
A 34 character string that uniquely identifies this Access Token.
- token
-
The access token generated for enrollment, this is an encrypted json web token.
- ttl
-
How long, in seconds, the access token is valid. Max: 5 minutes
- 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.