NAME
Twilio::Rest::Chat::V2::Service::Channel::Member - The Member resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $member = $client->chat->v2->services($service_sid)->channels($channel_sid)->members->create($identity, \%options);
for my $member ($client->chat->v2->services($service_sid)->channels($channel_sid)->members->read({}, 20)) {
...
}
my $member = $client->chat->v2->services($service_sid)->channels($channel_sid)->members($sid)->fetch;
$client->chat->v2->services($service_sid)->channels($channel_sid)->members($sid)->update(\%options);
$client->chat->v2->services($service_sid)->channels($channel_sid)->members($sid)->delete;
DESCRIPTION
Users joined to specific channels
This file holds MemberList, MemberPage, MemberContext and MemberInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
MemberList
Returned by $client->chat->v2->services($service_sid)->channels($channel_sid)->members. See also Twilio::ListResource.
create
my $member = $client->chat->v2->services($service_sid)->channels($channel_sid)->members->create($identity, \%options);
Returns a MemberInstance.
The required values are:
$identity-
The
identityvalue that uniquely identifies the new resource's User within the Service. See access tokens for more info.
The options are:
attributes-
A valid JSON string that contains application-specific data.
date_created-
The date, specified in ISO 8601 format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source. A string, or an object with an
epochmethod. See "iso8601_date_time" in Twilio::Serialize. date_updated-
The date, specified in ISO 8601 format, to assign to the resource as the date it was last updated. The default value is
null. Note that this parameter should only be used when a Member is being recreated from a backup/separate source and where a Member was previously updated. A string, or an object with anepochmethod. See "iso8601_date_time" in Twilio::Serialize. last_consumed_message_index-
The index of the last Message in the Channel that the Member has read. This parameter should only be used when recreating a Member from a backup/separate source.
last_consumption_timestamp-
The ISO 8601 timestamp of the last Message read event for the Member within the Channel. A string, or an object with an
epochmethod. See "iso8601_date_time" in Twilio::Serialize. role_sid-
The SID of the Role to assign to the member. The default roles are those specified on the Service.
x_twilio_webhook_enabled-
The X-Twilio-Webhook-Enabled HTTP request header One of
trueorfalse.
read
my @records = $client->chat->v2->services($service_sid)->channels($channel_sid)->members->read(\%options, $limit, $page_size);
Returns the records as a list, fetching as many pages as it needs.
The options are:
identity-
The User's
identityvalue of the Member resources to read. See access tokens for more details. An array reference.
stream
my $stream = $client->chat->v2->services($service_sid)->channels($channel_sid)->members->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->chat->v2->services($service_sid)->channels($channel_sid)->members->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->chat->v2->services($service_sid)->channels($channel_sid)->members->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->chat->v2->services($service_sid)->channels($channel_sid)->members->get_context($sid);
Returns a MemberContext, and makes no request.
MemberPage
A Twilio::Page of MemberInstance objects.
records_key
build_instance
Used by Twilio::Page.
MemberContext
Returned by $client->chat->v2->services($service_sid)->channels($channel_sid)->members($sid). It makes no request until one of these methods is called.
fetch
my $member = $client->chat->v2->services($service_sid)->channels($channel_sid)->members($sid)->fetch;
Returns a MemberInstance.
update
my $member = $client->chat->v2->services($service_sid)->channels($channel_sid)->members($sid)->update(\%options);
Returns a MemberInstance.
The options are:
attributes-
A valid JSON string that contains application-specific data.
date_created-
The date, specified in ISO 8601 format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source. A string, or an object with an
epochmethod. See "iso8601_date_time" in Twilio::Serialize. date_updated-
The date, specified in ISO 8601 format, to assign to the resource as the date it was last updated. A string, or an object with an
epochmethod. See "iso8601_date_time" in Twilio::Serialize. last_consumed_message_index-
The index of the last Message that the Member has read within the Channel.
last_consumption_timestamp-
The ISO 8601 timestamp of the last Message read event for the Member within the Channel. A string, or an object with an
epochmethod. See "iso8601_date_time" in Twilio::Serialize. role_sid-
The SID of the Role to assign to the member. The default roles are those specified on the Service.
x_twilio_webhook_enabled-
The X-Twilio-Webhook-Enabled HTTP request header One of
trueorfalse.
delete
$client->chat->v2->services($service_sid)->channels($channel_sid)->members($sid)->delete(\%options);
Returns true.
The options are:
x_twilio_webhook_enabled-
The X-Twilio-Webhook-Enabled HTTP request header One of
trueorfalse.
MemberInstance
See also Twilio::InstanceResource.
It has fetch, update and delete, which work as they do on the context.
Its fields are:
- account_sid
-
The SID of the Account that created the Member resource.
- attributes
-
The JSON string that stores application-specific data. If attributes have not been set,
{}is returned. - channel_sid
-
The SID of the Channel the Member resource belongs to.
- 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.
- identity
-
The application-defined string that uniquely identifies the resource's User within the Service. See access tokens for more info.
- last_consumed_message_index
-
The index of the last Message in the Channel that the Member has read.
- last_consumption_timestamp
-
The ISO 8601 timestamp of the last Message read event for the Member within the Channel. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- role_sid
-
The SID of the Role assigned to the member.
- service_sid
-
The SID of the Service the Member resource is associated with.
- sid
-
The unique string that we created to identify the Member resource.
- url
-
The absolute URL of the Member resource.
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.