# `Twilio.Chat.V2.Service.User.ChannelService`
[🔗](https://github.com/jeffhuen/twilio_elixir/blob/main/lib/twilio/chat/v2/service/user/channel_service.ex#L2)

List of channels for a given user

Operations: `list`, `fetch`, `update`, `delete`

# `delete`

```elixir
@spec delete(Twilio.Client.t(), String.t(), String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}
```

Removes User from selected Channel.

Operation: `DeleteUserChannel` | Tags: ChatV2UserChannel

# `fetch`

```elixir
@spec fetch(Twilio.Client.t(), String.t(), String.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Chat.V2.Service.User.Channel.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `FetchUserChannel` | Tags: ChatV2UserChannel

# `list`

```elixir
@spec list(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Page.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

List all Channels for a given User.

Operation: `ListUserChannel` | Tags: ChatV2UserChannel

# `stream`

```elixir
@spec stream(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  Enumerable.t()
```

Stream: List all Channels for a given User. (lazy auto-pagination).

# `update`

```elixir
@spec update(Twilio.Client.t(), String.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Chat.V2.Service.User.Channel.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `UpdateUserChannel` | Tags: ChatV2UserChannel

## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `LastConsumedMessageIndex` | integer | 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. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `LastConsumptionTimestamp` | string (date-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). |
| `NotificationLevel` | string |  Values: `default`, `muted` |

---

*Consult [api-reference.md](api-reference.md) for complete listing*
