Programmable Chat has been deprecated and is no longer supported. Instead, we'll be focusing on the next generation of chat: Twilio Conversations. Find out more about the EOL process here.
If you're starting a new project, please visit the Conversations Docs to begin. If you've already built on Programmable Chat, please visit our Migration Guide to learn about how to switch.
The User Channel resource of Programmable Chat is a read-only resource that describes a Channel that the User is a Member of.
Each User Channel resource contains these properties.
account_sid
type: SID<AC>The SID of the Account that created the User Channel resource.
^AC[0-9a-fA-F]{32}$
34
34
service_sid
type: SID<IS>The SID of the Service the User Channel resource is associated with.
^IS[0-9a-fA-F]{32}$
34
34
channel_sid
type: SID<CH>The SID of the Channel the User Channel resource belongs to.
^CH[0-9a-fA-F]{32}$
34
34
user_sid
type: SID<US>The SID of the User the User Channel belongs to.
^US[0-9a-fA-F]{32}$
34
34
member_sid
type: SID<MB>The SID of a Member that represents the User on the Channel.
^MB[0-9a-fA-F]{32}$
34
34
status
type: enum<string>The status of the User on the Channel. Can be: joined
, invited
, or not_participating
.
joined
invited
not_participating
last_consumed_message_index
type: integerunread_messages_count
type: integerThe number of unread Messages in the Channel for the User. Note that retrieving messages on a client endpoint does not mean that messages are consumed or read. See Consumption Horizon feature to learn how to mark messages as consumed.
links
type: object<uri-map>The absolute URLs of the Members, Messages , Invites and, if it exists, the last Message for the Channel.
notification_level
type: enum<string>The push notification level of the User for the Channel. Can be: default
or muted
.
default
muted
GET https://chat.twilio.com/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}
The {UserSid}
value can be either the sid
or the identity
of the User resource and the {ChannelSid}
value can be either the sid
or the unique_name
of the Channel to fetch.
ServiceSid
type: SID<IS>The SID of the Service to fetch the User Channel resource from.
^IS[0-9a-fA-F]{32}$
34
34
GET https://chat.twilio.com/v2/Services/{ServiceSid}/Users/{UserSid}/Channels
The {UserSid}
value can be either the sid
or the identity
of the User resource to read User Channel resources from.
ServiceSid
type: SID<IS>The SID of the Service to read the User Channel resources from.
^IS[0-9a-fA-F]{32}$
34
34
UserSid
type: stringThe SID of the User to read the User Channel resources from. This value can be either the sid
or the identity
of the User resource.
PageSize
type: integerHow many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Page
type: integerThe page index. This value is simply for client state.
0
POST https://chat.twilio.com/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}
The NotificationLevel
property expresses whether a user receives pushes for this channel or not. This can be set separately for each user/channel pair.
ServiceSid
type: SID<IS>The SID of the Service to update the User Channel resource in.
^IS[0-9a-fA-F]{32}$
34
34
UserSid
type: stringThe SID of the User to update the User Channel resource from. This value can be either the sid
or the identity
of the User resource.
ChannelSid
type: stringThe SID of the Channel with the User Channel resource to update. This value can be the Channel resource's sid
or unique_name
.
NotificationLevel
type: enum<string>The push notification level to assign to the User Channel. Can be: default
or muted
.
default
muted
LastConsumedMessageIndex
type: integer