---
source_url: https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/details
title: Get channel details
description: Learn to fetch direct, group, and public channel details using the getChannel method in PubNub Docs.
updated_at: 2026-05-12T11:37:48.000Z
---

# Get channel details

> For AI agents: documentation index at https://www.pubnub.com/llms-full.txt

Fetch a specific [channel's](https://www.pubnub.com/docs/chat/chat-sdk/learn/chat-entities/channel.md) 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

##### Under the hood

`getChannel()` calls App Context API and the JavaScript SDK [`getChannelMetadata()`](https://www.pubnub.com/docs/sdks/javascript/api-reference/objects.md#get-channel-metadata) method.

This method takes the following parameters:

```ts
chat.getChannel(
    id: string
): Promise<Channel | null>
```

#### Input

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| id | string | Yes | n/a | Unique channel identifier (up to 92 UTF-8 byte sequences). |

#### Output

| Type | Description |
| --- | --- |
| `Promise<Channel>` or `Promise<null>` | Object returning either the new channel metadata or null value if the channel doesn't exist. |

#### Errors

If you try to fetch a channel without providing its ID, you will receive the `ID is required` error.

### Sample code

Fetch the `support` channel metadata.

```ts
// reference the "chat" object and invoke the "getChannel()" method
const channel = await chat.getChannel("support")
```

Last updated at: 2026-05-12T11:37:48.000Z
