Fetch user channel
List of channels for a given user
Path parameters
-
The SID of the Service to fetch the User Channel resource from.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^IS[0-9a-fA-F]{32}$
. -
The SID of the User to fetch the User Channel resource from. This value can be either the
sid
or theidentity
of the User resource. -
The SID of the Channel that has the User Channel to fetch. This value can be either the
sid
or theunique_name
of the Channel to fetch.
GET
/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}
curl \
--request GET 'https://chat.twilio.com/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}' \
--user "username:password"
Response examples (200)
{
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"member": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"channel": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"status": "joined",
"user_sid": "USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"member_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"notification_level": "default",
"unread_messages_count": 5,
"last_consumed_message_index": 5
}