NAME

Twilio::Jwt::TaskRouter::WorkerCapability - A capability token for a worker

SYNOPSIS

my $capability = Twilio::Jwt::TaskRouter::WorkerCapability->new(
  $account_sid, $auth_token, $workspace_sid, $worker_sid
);
$capability->allow_activity_updates;
$capability->allow_reservation_updates;

print $capability->generate_token;

DESCRIPTION

See Twilio::Jwt::TaskRouter::CapabilityToken for the other methods. A worker can also read the activities, the tasks and its own reservations.

METHODS

new

my $capability = Twilio::Jwt::TaskRouter::WorkerCapability->new(
  $account_sid, $auth_token, $workspace_sid, $worker_sid, $base_url, $base_ws_url
);

allow_activity_updates

Lets the worker change its activity.

allow_reservation_updates

Lets the worker update tasks and its reservations.

setup_resource

Sets the URL of the worker.

LICENSE

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