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

# getChatId

> Get the ID of the chat from the given key.

> **getChatId**(`__namedParameters`): `string`

Defined in: [src/Utils/process-message.ts:191](https://github.com/WhiskeySockets/Baileys/blob/master/src/Utils/process-message.ts#L191)

Get the ID of the chat from the given key.
Typically -- that'll be the remoteJid, but for broadcasts, it'll be the participant

## Parameters

### \_\_namedParameters

[`WAMessageKey`](/api-reference/type-aliases/WAMessageKey)

## Returns

`string`
