github.com/twilio/twilio-go@v1.20.1/rest/chat/v2/docs/ServicesUsersChannelsApi.md (about) 1 # ServicesUsersChannelsApi 2 3 All URIs are relative to *https://chat.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**DeleteUserChannel**](ServicesUsersChannelsApi.md#DeleteUserChannel) | **Delete** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid} | 8 [**FetchUserChannel**](ServicesUsersChannelsApi.md#FetchUserChannel) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid} | 9 [**ListUserChannel**](ServicesUsersChannelsApi.md#ListUserChannel) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels | 10 [**UpdateUserChannel**](ServicesUsersChannelsApi.md#UpdateUserChannel) | **Post** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid} | 11 12 13 14 ## DeleteUserChannel 15 16 > DeleteUserChannel(ctx, ServiceSidUserSidChannelSidoptional) 17 18 19 20 Removes User from selected Channel. 21 22 ### Path Parameters 23 24 25 Name | Type | Description 26 ------------- | ------------- | ------------- 27 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 28 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. 29 **UserSid** | **string** | The SID of the [User](https://www.twilio.com/docs/api/chat/rest/users) to read the User Channel resources from. 30 **ChannelSid** | **string** | The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource belongs to. 31 32 ### Other Parameters 33 34 Other parameters are passed through a pointer to a DeleteUserChannelParams struct 35 36 37 Name | Type | Description 38 ------------- | ------------- | ------------- 39 **XTwilioWebhookEnabled** | **string** | The X-Twilio-Webhook-Enabled HTTP request header 40 41 ### Return type 42 43 (empty response body) 44 45 ### Authorization 46 47 [accountSid_authToken](../README.md#accountSid_authToken) 48 49 ### HTTP request headers 50 51 - **Content-Type**: Not defined 52 - **Accept**: Not defined 53 54 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 55 [[Back to Model list]](../README.md#documentation-for-models) 56 [[Back to README]](../README.md) 57 58 59 ## FetchUserChannel 60 61 > ChatV2UserChannel FetchUserChannel(ctx, ServiceSidUserSidChannelSid) 62 63 64 65 66 67 ### Path Parameters 68 69 70 Name | Type | Description 71 ------------- | ------------- | ------------- 72 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 73 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the User Channel resource from. 74 **UserSid** | **string** | The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) to fetch the User Channel resource from. This value can be either the `sid` or the `identity` of the User resource. 75 **ChannelSid** | **string** | The SID of the [Channel](https://www.twilio.com/docs/chat/channels) that has the User Channel to fetch. This value can be either the `sid` or the `unique_name` of the Channel to fetch. 76 77 ### Other Parameters 78 79 Other parameters are passed through a pointer to a FetchUserChannelParams struct 80 81 82 Name | Type | Description 83 ------------- | ------------- | ------------- 84 85 ### Return type 86 87 [**ChatV2UserChannel**](ChatV2UserChannel.md) 88 89 ### Authorization 90 91 [accountSid_authToken](../README.md#accountSid_authToken) 92 93 ### HTTP request headers 94 95 - **Content-Type**: Not defined 96 - **Accept**: application/json 97 98 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 99 [[Back to Model list]](../README.md#documentation-for-models) 100 [[Back to README]](../README.md) 101 102 103 ## ListUserChannel 104 105 > []ChatV2UserChannel ListUserChannel(ctx, ServiceSidUserSidoptional) 106 107 108 109 List all Channels for a given User. 110 111 ### Path Parameters 112 113 114 Name | Type | Description 115 ------------- | ------------- | ------------- 116 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 117 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the User Channel resources from. 118 **UserSid** | **string** | The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) to read the User Channel resources from. This value can be either the `sid` or the `identity` of the User resource. 119 120 ### Other Parameters 121 122 Other parameters are passed through a pointer to a ListUserChannelParams struct 123 124 125 Name | Type | Description 126 ------------- | ------------- | ------------- 127 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 128 **Limit** | **int** | Max number of records to return. 129 130 ### Return type 131 132 [**[]ChatV2UserChannel**](ChatV2UserChannel.md) 133 134 ### Authorization 135 136 [accountSid_authToken](../README.md#accountSid_authToken) 137 138 ### HTTP request headers 139 140 - **Content-Type**: Not defined 141 - **Accept**: application/json 142 143 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 144 [[Back to Model list]](../README.md#documentation-for-models) 145 [[Back to README]](../README.md) 146 147 148 ## UpdateUserChannel 149 150 > ChatV2UserChannel UpdateUserChannel(ctx, ServiceSidUserSidChannelSidoptional) 151 152 153 154 155 156 ### Path Parameters 157 158 159 Name | Type | Description 160 ------------- | ------------- | ------------- 161 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 162 **ServiceSid** | **string** | The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the User Channel resource in. 163 **UserSid** | **string** | The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) to update the User Channel resource from. This value can be either the `sid` or the `identity` of the User resource. 164 **ChannelSid** | **string** | The SID of the [Channel](https://www.twilio.com/docs/chat/channels) with the User Channel resource to update. This value can be the Channel resource's `sid` or `unique_name`. 165 166 ### Other Parameters 167 168 Other parameters are passed through a pointer to a UpdateUserChannelParams struct 169 170 171 Name | Type | Description 172 ------------- | ------------- | ------------- 173 **NotificationLevel** | **string** | 174 **LastConsumedMessageIndex** | **int** | The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read. 175 **LastConsumptionTimestamp** | **time.Time** | The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). 176 177 ### Return type 178 179 [**ChatV2UserChannel**](ChatV2UserChannel.md) 180 181 ### Authorization 182 183 [accountSid_authToken](../README.md#accountSid_authToken) 184 185 ### HTTP request headers 186 187 - **Content-Type**: application/x-www-form-urlencoded 188 - **Accept**: application/json 189 190 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 191 [[Back to Model list]](../README.md#documentation-for-models) 192 [[Back to README]](../README.md) 193