NAME

Twilio::Jwt::Grants::TaskRouterGrant - Lets a client work with TaskRouter

SYNOPSIS

my $grant = Twilio::Jwt::Grants::TaskRouterGrant->new;
$grant->set_workspace_sid($workspace_sid);
$grant->set_worker_sid($worker_sid);
$grant->set_role('worker');

$token->add_grant($grant);

DESCRIPTION

See Twilio::Jwt::AccessToken. Each set_ method returns the grant.

METHODS

get_grant_key

Returns task_router.

payload_fields

Returns the fields of the grant.

get_workspace_sid

set_workspace_sid

get_worker_sid

set_worker_sid

get_role

set_role

Read and change each value.

LICENSE

Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.