NAME
Twilio::Rest::Api::V2010::Account::Key - The Key resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
for my $key ($client->keys->read({}, 20)) {
...
}
my $key = $client->keys($sid)->fetch;
$client->keys($sid)->update(\%options);
$client->keys($sid)->delete;
DESCRIPTION
API keys
This file holds KeyList, KeyPage, KeyContext and KeyInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
KeyList
Returned by $client->keys. See also Twilio::ListResource.
read
my @records = $client->keys->read(\%options, $limit, $page_size);
Returns the records as a list, fetching as many pages as it needs.
stream
my $stream = $client->keys->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->keys->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->keys->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->keys->get_context($sid);
Returns a KeyContext, and makes no request.
KeyPage
A Twilio::Page of KeyInstance objects.
records_key
build_instance
Used by Twilio::Page.
KeyContext
Returned by $client->keys($sid). It makes no request until one of these methods is called.
fetch
my $key = $client->keys($sid)->fetch;
Returns a KeyInstance.
update
my $key = $client->keys($sid)->update(\%options);
Returns a KeyInstance.
The options are:
friendly_name-
A descriptive string that you create to describe the resource. It can be up to 64 characters long.
delete
$client->keys($sid)->delete;
Returns true.
KeyInstance
See also Twilio::InstanceResource.
It has fetch, update and delete, which work as they do on the context.
Its fields are:
- date_created
-
The date and time in GMT that the resource was created specified in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- date_updated
-
The date and time in GMT that the resource was last updated specified in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- friendly_name
-
The string that you assigned to describe the resource.
- sid
-
The unique string that that we created to identify the Key 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.