NAME

Twilio::Rest::Iam::V1::OAuthApp - The OAuthApp resource

SYNOPSIS

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

my $oauth_app = $client->iam->v1->oauth_apps->create(\%body);
$client->iam->v1->oauth_apps($sid)->update(\%body);
$client->iam->v1->oauth_apps($sid)->delete;

DESCRIPTION

This file holds OAuthAppList, OAuthAppContext and OAuthAppInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

OAuthAppList

Returned by $client->iam->v1->oauth_apps. See also Twilio::ListResource.

create

my $oauth_app = $client->iam->v1->oauth_apps->create(\%body);

Returns a OAuthAppInstance.

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

Its fields are:

access_token_ttl

No description in the specification.

client_sid

No description in the specification.

description

No description in the specification.

friendly_name

No description in the specification.

owner_sid

No description in the specification.

policy

No description in the specification.

token_endpoint_auth_method

Determines how the client authenticates. Account OAuth apps on v1 only support 'client_secret_basic'. For PKCE (none), use the v2 API. Must be client_secret_basic.

type

No description in the specification.

get_context

my $context = $client->iam->v1->oauth_apps->get_context($sid);

Returns a OAuthAppContext, and makes no request.

OAuthAppContext

Returned by $client->iam->v1->oauth_apps($sid). It makes no request until one of these methods is called.

update

my $oauth_app = $client->iam->v1->oauth_apps($sid)->update(\%body);

Returns a OAuthAppInstance.

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

Its fields are:

access_token_ttl

No description in the specification.

description

No description in the specification.

friendly_name

No description in the specification.

policy

No description in the specification.

type

No description in the specification.

delete

$client->iam->v1->oauth_apps($sid)->delete;

Returns true.

OAuthAppInstance

See also Twilio::InstanceResource.

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

Its fields are:

access_token_ttl

No description in the specification.

created_by

No description in the specification.

creator_sid

The unique identifier (SID) of the user who created this OAuth app.

date_created

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

description

No description in the specification.

friendly_name

No description in the specification.

policy

No description in the specification.

secret

No description in the specification.

sid

No description in the specification.

status

No description in the specification.

type

No description in the specification.

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.