NAME
Twilio::Rest::Conversations::V1::Service::User - The User resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $user = $client->conversations->v1->services($chat_service_sid)->users->create($identity, \%options);
for my $user ($client->conversations->v1->services($chat_service_sid)->users->read({}, 20)) {
...
}
my $user = $client->conversations->v1->services($chat_service_sid)->users($sid)->fetch;
$client->conversations->v1->services($chat_service_sid)->users($sid)->update(\%options);
$client->conversations->v1->services($chat_service_sid)->users($sid)->delete;
DESCRIPTION
A Service User resource represents a conversation user belonging to a specific conversation service.
This file holds UserList, UserPage, UserContext and UserInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
UserList
Returned by $client->conversations->v1->services($chat_service_sid)->users. See also Twilio::ListResource.
create
my $user = $client->conversations->v1->services($chat_service_sid)->users->create($identity, \%options);
Add a new conversation user to your service. Returns a UserInstance.
The required values are:
$identity-
The application-defined string that uniquely identifies the resource's User within the Conversation Service. This value is often a username or an email address, and is case-sensitive.
The options are:
attributes-
The JSON Object string that stores application-specific data. If attributes have not been set,
{}is returned. friendly_name-
The string that you assigned to describe the resource.
role_sid-
The SID of a service-level Role to assign to the user.
x_twilio_webhook_enabled-
The X-Twilio-Webhook-Enabled HTTP request header One of
trueorfalse.
read
my @records = $client->conversations->v1->services($chat_service_sid)->users->read(\%options, $limit, $page_size);
Retrieve a list of all conversation users in your service. Returns the records as a list, fetching as many pages as it needs.
stream
my $stream = $client->conversations->v1->services($chat_service_sid)->users->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->conversations->v1->services($chat_service_sid)->users->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->conversations->v1->services($chat_service_sid)->users->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->conversations->v1->services($chat_service_sid)->users->get_context($sid);
Returns a UserContext, and makes no request.
UserPage
A Twilio::Page of UserInstance objects.
records_key
build_instance
Used by Twilio::Page.
UserContext
Returned by $client->conversations->v1->services($chat_service_sid)->users($sid). It makes no request until one of these methods is called.
fetch
my $user = $client->conversations->v1->services($chat_service_sid)->users($sid)->fetch;
Fetch a conversation user from your service. Returns a UserInstance.
update
my $user = $client->conversations->v1->services($chat_service_sid)->users($sid)->update(\%options);
Update an existing conversation user in your service. Returns a UserInstance.
The options are:
attributes-
The JSON Object string that stores application-specific data. If attributes have not been set,
{}is returned. friendly_name-
The string that you assigned to describe the resource.
role_sid-
The SID of a service-level Role to assign to the user.
x_twilio_webhook_enabled-
The X-Twilio-Webhook-Enabled HTTP request header One of
trueorfalse.
delete
$client->conversations->v1->services($chat_service_sid)->users($sid)->delete(\%options);
Remove a conversation user from your service. Returns true.
The options are:
x_twilio_webhook_enabled-
The X-Twilio-Webhook-Enabled HTTP request header One of
trueorfalse.
user_conversations
my $list = $object->user_conversations;
my $context = $object->user_conversations($conversation_sid);
See Twilio::Rest::Conversations::V1::Service::User::UserConversation.
UserInstance
See also Twilio::InstanceResource.
It has fetch, update, delete and user_conversations, which work as they do on the context.
Its fields are:
- account_sid
-
The SID of the Account that created the User resource.
- attributes
-
The JSON Object string that stores application-specific data. If attributes have not been set,
{}is returned. - chat_service_sid
-
The SID of the Conversation Service the User resource is associated with.
- date_created
-
The date and time in GMT when the resource was created specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- date_updated
-
The date and time in GMT when the resource was last updated specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- friendly_name
-
The string that you assigned to describe the resource.
- identity
-
The application-defined string that uniquely identifies the resource's User within the Conversation Service. This value is often a username or an email address, and is case-sensitive.
- is_notifiable
-
Whether the User has a potentially valid Push Notification registration (APN or GCM) for this Conversations Service. If at least one registration exists,
true; otherwisefalse. This value is only returned by Fetch actions that return a single resource andnullis always returned by a Read action. This value isnullif the Service'sreachability_enabledisfalse, and if the User has never had a notification registration, even if the Service'sreachability_enabledistrue. - is_online
-
Whether the User is actively connected to this Conversations Service and online. This value is only returned by Fetch actions that return a single resource and
nullis always returned by a Read action. This value isnullif the Service'sreachability_enabledisfalse, if the User has never been online for this Conversations Service, even if the Service'sreachability_enabledistrue. - links
-
No description in the specification.
- role_sid
-
The SID of a service-level Role assigned to the user.
- sid
-
The unique string that we created to identify the User resource.
- url
-
An absolute API resource URL for this user.
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.