Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

メニュー

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

User Channel Resource

The User Channel resource of Programmable Chat is a read-only resource that describes a Channel that the User is a Member of.

UserChannel properties

Each User Channel resource contains these properties.

Names in PHP format
accountSid
sid<AC> Not PII

The SID of the Account that created the User Channel resource.

serviceSid
sid<IS> Not PII

The SID of the Service the User Channel resource is associated with.

channelSid
sid<CH> Not PII

The SID of the Channel the User Channel resource belongs to.

userSid
sid<US> Not PII

The SID of the User the User Channel belongs to.

memberSid
sid<MB> Not PII

The SID of a Member that represents the User on the Channel.

status
enum:channel_status Not PII

The status of the User on the Channel. Can be: joined, invited, or not_participating.

lastConsumedMessageIndex
integer? Not PII

The index of the last Message in the Channel that the Member has read.

unreadMessagesCount
integer? Not PII

The 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
uri_map Not PII

The absolute URLs of the Members, Messages , Invites and, if it exists, the last Message for the Channel.

url
url Not PII

The absolute URL of the User Channel resource.

notificationLevel
enum:notification_level Not PII

The push notification level of the User for the Channel. Can be: default or muted.

Fetch a UserChannel resource

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.

パラメーター
Names in None format
service_sid
必須
GET sid<IS> Not PII

The SID of the Service to fetch the User Channel resource from.

user_sid
必須
GET sid_like<US> Not PII

The SID of the User to fetch the User Channel resource from. This value can be either the sid or the identity of the User resource.

channel_sid
必須
GET sid_like<CH> Not PII

The SID of the Channel that has the User Channel to fetch. This value can be either the sid or the unique_name of the Channel to fetch.

例 1
        
        
        
        

        Read multiple UserChannel resources

        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.

        パラメーター
        Names in None format
        service_sid
        必須
        GET sid<IS> Not PII

        The SID of the Service to read the User Channel resources from.

        user_sid
        必須
        GET sid_like<US> Not PII

        The 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.

        例 1
              
              
              
              

              Update a UserChannel resource

              post
              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 update.

              パラメーター
              Names in None format
              service_sid
              必須
              post sid<IS> Not PII

              The SID of the Service to update the User Channel resource in.

              user_sid
              必須
              post sid_like<US> Not PII

              The 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.

              channel_sid
              必須
              post sid_like<CH> Not PII

              The SID of the Channel with the User Channel resource to update. This value can be the Channel resource's sid or unique_name.

              notification_level
              必須
              post enum:notification_level Not PII

              The push notification level to assign to the User Channel. Can be: default or muted.

              例 1
                    
                    
                    
                    
                    Rate this page:

                    ヘルプが必要ですか?

                    誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。