Table: twilio_chat_service_user - Query Twilio Chat Service Users using SQL
Twilio Chat Service Users are entities within Twilio's Chat Service that represent individual participants in a chat. Each user has a unique identity and can be associated with one or more chat services. The user's identity, role, and other attributes can be managed and queried through Twilio's API.
Table Usage Guide
The twilio_chat_service_user
table provides insights into users within Twilio's Chat Service. As an application developer or system administrator, you can explore user-specific details through this table, including their roles, identities, and other associated metadata. Utilize it to uncover information about users, such as their participation in different chat services, their roles within these services, and the management of their identities.
Important Notes
- You must specify the
service_sid
in thewhere
clause to query this table.
Examples
Basic info
Discover the segments that have been created within a specific chat service, including their status and creation date. This can be particularly useful in identifying active users and understanding the overall usage patterns of the service.
select sid, friendly_name, identity, service_sid, date_created, is_online, account_sidfrom twilio_chat_service_userwhere service_sid = 'IS69abc66f24de48919638c0a0bfaf2a70';
select sid, friendly_name, identity, service_sid, date_created, is_online, account_sidfrom twilio_chat_service_userwhere service_sid = 'IS69abc66f24de48919638c0a0bfaf2a70';
List online users
Explore which users are currently online in a particular chat service. This can be particularly useful for real-time user engagement or to monitor active participation within a specific chat service.
select distinct sid, friendly_name, identity, service_sid, is_online, account_sidfrom twilio_chat_service_userwhere service_sid = 'IS69abc66f24de48919638c0a0bfaf2a70' and is_online;
select distinct sid, friendly_name, identity, service_sid, is_online, account_sidfrom twilio_chat_service_userwhere service_sid = 'IS69abc66f24de48919638c0a0bfaf2a70' and is_online;
List channel count per user
Analyze the settings to understand the distribution of chat channels for each user within a specific service. This can be useful for identifying user engagement and managing resource allocation.
select distinct sid, friendly_name, identity, joined_channels_count, account_sidfrom twilio_chat_service_userwhere service_sid = 'IS69abc66f24de48919638c0a0bfaf2a70';
select distinct sid, friendly_name, identity, joined_channels_count, account_sidfrom twilio_chat_service_userwhere service_sid = 'IS69abc66f24de48919638c0a0bfaf2a70';
Schema for twilio_chat_service_user
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
account_sid | text | The SID of the Account that created the resource. | |
attributes | text | The JSON string that stores application-specific data. | |
date_created | timestamp with time zone | The date and time that the resource was created. | |
date_updated | timestamp with time zone | The date and time that the resource was last updated. | |
friendly_name | text | The string that you assigned to describe the resource. | |
identity | text | The string that identifies the resource's User. | |
is_notifiable | boolean | Indicates whether the User has a potentially valid Push Notification registration for the Service instance, or not. | |
is_online | boolean | Indicates whether the User is actively connected to the Service instance and online, or not. | |
joined_channels_count | bigint | The number of Channels the User is a Member of. | |
links | jsonb | A list of absolute URLs of the Channel and Binding resources related to the user. | |
role_sid | text | The SID of the Role assigned to the user. | |
service_sid | text | = | The SID of the Service that the resource is associated with. |
sid | text | = | The unique string that identifies the resource. |
title | text | Title of the resource. | |
url | text | The absolute URL of the Service resource. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- twilio
You can pass the configuration to the command with the --config
argument:
steampipe_export_twilio --config '<your_config>' twilio_chat_service_user