NAME
Twilio::Rest::Chat::V2::Service::User::UserBinding - The UserBinding resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
for my $user_binding ($client->chat->v2->services($service_sid)->users($user_sid)->user_bindings->read({}, 20)) {
...
}
my $user_binding = $client->chat->v2->services($service_sid)->users($user_sid)->user_bindings($sid)->fetch;
$client->chat->v2->services($service_sid)->users($user_sid)->user_bindings($sid)->delete;
DESCRIPTION
List of bindings for a given user
This file holds UserBindingList, UserBindingPage, UserBindingContext and UserBindingInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
UserBindingList
Returned by $client->chat->v2->services($service_sid)->users($user_sid)->user_bindings. See also Twilio::ListResource.
read
my @records = $client->chat->v2->services($service_sid)->users($user_sid)->user_bindings->read(\%options, $limit, $page_size);
Returns the records as a list, fetching as many pages as it needs.
The options are:
binding_type-
The push technology used by the User Binding resources to read. Can be:
apn,gcm, orfcm. See push notification configuration for more info. One ofgcm,apnorfcm. An array reference.
stream
my $stream = $client->chat->v2->services($service_sid)->users($user_sid)->user_bindings->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)->users($user_sid)->user_bindings->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)->users($user_sid)->user_bindings->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->chat->v2->services($service_sid)->users($user_sid)->user_bindings->get_context($sid);
Returns a UserBindingContext, and makes no request.
UserBindingPage
A Twilio::Page of UserBindingInstance objects.
records_key
build_instance
Used by Twilio::Page.
UserBindingContext
Returned by $client->chat->v2->services($service_sid)->users($user_sid)->user_bindings($sid). It makes no request until one of these methods is called.
fetch
my $user_binding = $client->chat->v2->services($service_sid)->users($user_sid)->user_bindings($sid)->fetch;
Returns a UserBindingInstance.
delete
$client->chat->v2->services($service_sid)->users($user_sid)->user_bindings($sid)->delete;
Returns true.
UserBindingInstance
See also Twilio::InstanceResource.
It has fetch and delete, which work as they do on the context.
Its fields are:
- account_sid
-
The SID of the Account that created the User Binding resource.
- binding_type
-
One of
gcm,apnorfcm. - credential_sid
-
The SID of the Credential for the binding. See push notification configuration for more info.
- 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.
- endpoint
-
The unique endpoint identifier for the User Binding. The format of the value depends on the
binding_type. - identity
-
The application-defined string that uniquely identifies the resource's User within the Service. See access tokens for more info.
- message_types
-
The Programmable Chat message types the binding is subscribed to.
- service_sid
-
The SID of the Service the User Binding resource is associated with.
- sid
-
The unique string that we created to identify the User Binding resource.
- url
-
The absolute URL of the User Binding resource.
- user_sid
-
The SID of the User with the User Binding resource. See push notification configuration for more info.
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.