---
source_url: https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/channels/details
title: Get channel details
updated_at: 2026-05-21T15:44:57.483Z
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# Get channel details

Fetch a specific [channel's](https://www.pubnub.com/docs/chat/swift-chat-sdk/learn/chat-entities/channel) metadata with `getChannel()`.

:::note Requires App Context
Enable [App Context](https://youtu.be/9UEoSlngpYI) for your keyset in the [Admin Portal](https://admin.pubnub.com/).
:::

### Method signature

This method takes the following parameters:

```swift
chat.getChannel(
    channelId: String
) async throws -> ChannelImpl?
```

#### Input

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| channelId | String | Yes |  | Unique channel identifier (up to 92 UTF-8 byte sequences). |

#### Output

| Parameter | Description |
| --- | --- |
| `ChannelImpl` | Object returning the new channel metadata. |

### Sample code

:::tip Sample code
The code samples in Swift Chat SDK focus on asynchronous code execution.
You can also write synchronous code as the parameters are shared between the async and sync methods but we don't provide usage examples of such.
:::

Fetch the `support` channel metadata.

```swift
// Assumes a "ChatImpl" reference named "chat"
Task {
  if let channel = try await chat.getChannel(channelId: "support") {
    debugPrint("Fetched channel metadata with ID: \(channel.id)")
  } else {
    debugPrint("Channel not found")
  }
}
```