> ## Documentation Index
> Fetch the complete documentation index at: https://docs.towns.com/llms.txt
> Use this file to discover all available pages before exploring further.

# useGdm

Hook to get the data of a Group DM. You can use this hook to get Group DM metadata and if the user has joined the Group DM.

## Imports

```ts theme={null}
import { useGdm } from '@towns-protocol/react-sdk'
```

## Definition

```ts theme={null}
function useGdm(
  streamId: string,
  config?: ObservableConfig.FromData<GdmModel>,
): ObservableValue<GdmModel>
```

**Source:** [useGdm](https://github.com/towns-protocol/towns/blob/main/packages/react-sdk/src/useGdm.ts)

## Parameters

### streamId

* **Type:** `string`

The id of the Group DM to get the data of.

### config

* **Type:** `ObservableConfig.FromData<GdmModel>`
* **Optional**

Configuration options for the observable.

## Return Type

The GdmModel of the Group DM.

```ts theme={null}
ObservableValue<GdmModel>
```
