NAME
Twilio::Rest::Accounts::V1::Credential::PublicKey - The PublicKey resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $public_key = $client->accounts->v1->credentials->public_key->create($public_key, \%options);
for my $public_key ($client->accounts->v1->credentials->public_key->read({}, 20)) {
...
}
my $public_key = $client->accounts->v1->credentials->public_key($sid)->fetch;
$client->accounts->v1->credentials->public_key($sid)->update(\%options);
$client->accounts->v1->credentials->public_key($sid)->delete;
DESCRIPTION
User provided public keys
This file holds PublicKeyList, PublicKeyPage, PublicKeyContext and PublicKeyInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
PublicKeyList
Returned by $client->accounts->v1->credentials->public_key. See also Twilio::ListResource.
create
my $public_key = $client->accounts->v1->credentials->public_key->create($public_key, \%options);
Create a new Public Key Credential. Returns a PublicKeyInstance.
The required values are:
$public_key-
A URL encoded representation of the public key. For example,
-----BEGIN PUBLIC KEY-----MIIBIjANB.pa9xQIDAQAB-----END PUBLIC KEY-----
The options are:
account_sid-
The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request
friendly_name-
A descriptive string that you create to describe the resource. It can be up to 64 characters long.
read
my @records = $client->accounts->v1->credentials->public_key->read(\%options, $limit, $page_size);
Retrieves a collection of Public Key Credentials belonging to the account used to make the request. Returns the records as a list, fetching as many pages as it needs.
stream
my $stream = $client->accounts->v1->credentials->public_key->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->accounts->v1->credentials->public_key->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->accounts->v1->credentials->public_key->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->accounts->v1->credentials->public_key->get_context($sid);
Returns a PublicKeyContext, and makes no request.
PublicKeyPage
A Twilio::Page of PublicKeyInstance objects.
records_key
build_instance
Used by Twilio::Page.
PublicKeyContext
Returned by $client->accounts->v1->credentials->public_key($sid). It makes no request until one of these methods is called.
fetch
my $public_key = $client->accounts->v1->credentials->public_key($sid)->fetch;
Fetch the public key specified by the provided Credential Sid. Returns a PublicKeyInstance.
update
my $public_key = $client->accounts->v1->credentials->public_key($sid)->update(\%options);
Modify the properties of a given Account. Returns a PublicKeyInstance.
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->accounts->v1->credentials->public_key($sid)->delete;
Delete a Credential from your account. Returns true.
PublicKeyInstance
See also Twilio::InstanceResource.
It has fetch, update and delete, which work as they do on the context.
Its fields are:
- account_sid
-
The SID of the Account that created the Credential that the PublicKey resource belongs to.
- date_created
-
The date and time in GMT when 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 when 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 PublicKey resource.
- url
-
The URI for this resource, relative to
https://accounts.twilio.com
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.