NAME
Twilio::Rest::PreviewIam::V1::Token - The Token resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $token = $client->preview_iam->v1->token->create($grant_type, $client_id, \%options);
DESCRIPTION
This file holds TokenList and TokenInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
TokenList
Returned by $client->preview_iam->v1->token. See also Twilio::ListResource.
create
my $token = $client->preview_iam->v1->token->create($grant_type, $client_id, \%options);
Returns a TokenInstance.
The required values are:
$grant_type-
Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token.
$client_id-
A 34 character string that uniquely identifies this OAuth App.
The options are:
audience-
The targeted audience uri
client_secret-
The credential for confidential OAuth App.
code-
JWT token related to the authorization code grant type.
redirect_uri-
The redirect uri
refresh_token-
JWT token related to refresh access token.
scope-
The scope of token
TokenInstance
See also Twilio::InstanceResource.
Its fields are:
- access_token
-
Token which carries the necessary information to access a Twilio resource directly.
- expires_in
-
No description in the specification.
- id_token
-
Token which carries the information necessary of user profile.
- refresh_token
-
Token which carries the information necessary to get a new access token.
- token_type
-
Token type
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.