NAME

Twilio::Rest::Webhooks::V1::AuthProfile - The AuthProfile resource

SYNOPSIS

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

my $auth_profile = $client->webhooks->v1->auth_profiles->create(\%body, \%options);
for my $auth_profile ($client->webhooks->v1->auth_profiles->read({}, 20)) {
  ...
}
my $auth_profile = $client->webhooks->v1->auth_profiles($auth_profile_id)->fetch;
$client->webhooks->v1->auth_profiles($auth_profile_id)->patch(\%body);
$client->webhooks->v1->auth_profiles($auth_profile_id)->delete;

DESCRIPTION

This file holds AuthProfileList, AuthProfilePage, AuthProfileContext and AuthProfileInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

AuthProfileList

Returned by $client->webhooks->v1->auth_profiles. See also Twilio::ListResource.

create

my $auth_profile = $client->webhooks->v1->auth_profiles->create(\%body, \%options);

Creates a new reusable AuthProfile resource for use across multiple Settings. Returns a AuthProfileInstance.

%body is sent as JSON. It takes the names Twilio's API documentation uses.

The options are:

idempotency_key

Idempotency key for mutation operations. Must be a UUIDv7 (other UUID versions are rejected with a 400).

read

my @records = $client->webhooks->v1->auth_profiles->read(\%options, $limit, $page_size);

Returns a paginated list of AuthProfile summaries. Secrets are never included in list responses. Returns the records as a list, fetching as many pages as it needs.

stream

my $stream = $client->webhooks->v1->auth_profiles->stream(\%options, $limit, $page_size);

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

page

my $page = $client->webhooks->v1->auth_profiles->page(\%options, $page_size, $page_token);

Fetches one page, and returns a Twilio::TokenPaginationPage. This API pages by token, so there is no page number.

get_page

my $page = $client->webhooks->v1->auth_profiles->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->webhooks->v1->auth_profiles->get_context($auth_profile_id);

Returns a AuthProfileContext, and makes no request.

AuthProfilePage

A Twilio::Page of AuthProfileInstance objects.

records_key

build_instance

Used by Twilio::Page.

AuthProfileContext

Returned by $client->webhooks->v1->auth_profiles($auth_profile_id). It makes no request until one of these methods is called.

fetch

my $auth_profile = $client->webhooks->v1->auth_profiles($auth_profile_id)->fetch;

Returns an AuthProfile resource by its ID. Secrets are never returned in GET responses. Returns a AuthProfileInstance.

patch

my $auth_profile = $client->webhooks->v1->auth_profiles($auth_profile_id)->patch(\%body);

Updates only the friendlyName field. AuthProfile resources are immutable except for friendlyName. To change auth configuration (clientId, tokenUrl, etc.), create a new AuthProfile resource. Returns a AuthProfileInstance.

%body is sent as JSON. It takes the names Twilio's API documentation uses.

Its fields are:

friendlyName

Human-readable name for identification

delete

$client->webhooks->v1->auth_profiles($auth_profile_id)->delete;

Permanently deletes the AuthProfile resource. Returns 409 Conflict if the AuthProfile is still referenced by any Settings resource. 409 Resolution: 1. List dependencies: GET /Settings?authProfileId={id} 2. Delete/update them 3. Retry deletion. Returns true.

AuthProfileInstance

See also Twilio::InstanceResource.

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

Its fields are:

audience

OAuth2 audience parameter

client_credentials_auth_method

Client credentials authentication method (defaults to CLIENT_SECRET_POST) One of CLIENT_SECRET_POST or CLIENT_SECRET_BASIC.

client_id

OAuth2 client identifier

client_secret

OAuth2 client secret (never returned, stored securely as secret)

created_at

A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

friendly_name

Human-readable name for identification

id

Unique AuthProfile identifier (TypeID/TTID format)

password

Basic auth password (never returned, stored securely as secret)

scope

OAuth2 scope to request

token_url

OAuth2 token endpoint URL

type

Authentication type Must be OAUTH2.

updated_at

A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

username

Basic auth username

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.