User Channels Resource

The User Channels resource of Programmable Chat is a list only resource which will return the list of Channels the User is a Member of.

The underlying resource is the normal Channel resource of Chat.


Each channel instance returned in the list has the following properties:

name description
sid A 34 character string that uniquely identifies this resource.
account_sid The unique id of the [Account][/console] responsible for this channel.
service_sid The unique id of the [Service][service] this channel belongs to.
unread_messages_count The count of unread Messages in this Channel for this User. Note that just retrieving messages on a client endpoint does not mean that messages are consumed/read, please consider reading about Consumption Horizon feature to find out how to mark messages as consumed.
last_consumed_message_index The index of the last read Message in this Channel for this User
channel An absolute URL for the underlying channel resource instance
member Optional: Link to this User's Member resource. Note that this will be null if the status is != joined

List All User Channels

GET /Services/{Instance SID}/Users/{User SID}/Channels

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.