Skip to content

Commit c694dce

Browse files
committed
chatId all and message id
fix devlikeapro/waha#1892
1 parent c8aa8d3 commit c694dce

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

content/docs/how-to/chats/index.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ GET /api/{session}/chats/{chatId}/messages?limit=10
217217

218218
Available parameters:
219219
- `downloadMedia=true` - download media files (images, files) or not
220-
- `chatId=123@c.us` - chatId, phone number
221-
- `chatId=all` - get messages from all chats (works on [**NOWEB**]({{< relref "/docs/how-to/engines#noweb" >}}) engine only)
220+
- `chatId=123@c.us` - chatId, phone number or `all`
221+
- `chatId=all` works for getting messages from **all chats** on [**GOWS**]({{< relref "/docs/engines/gows" >}}) and [**NOWEB**]({{< relref "/docs/engines/noweb" >}}).
222222
- `limit=100` - limit the number of chats to return
223223
- `offset=0` - skip the number of chats from the start
224224
- `filter.timestamp.lte=1727745026` - filter messages by timestamp less than or equal to `1727745026`
@@ -294,9 +294,21 @@ GET /api/{session}/chats/{chatId}/messages/{messageId}?downloadMedia=true
294294
```
295295

296296
- `chatId` - in format `123123123@c.us`
297-
- `messageId` - must be in format `{true|false}_213213@c.us_AAAAAAA`)
297+
- `chatId=all` works for getting messages from **all chats** on [**GOWS**]({{< relref "/docs/engines/gows" >}}) and [**NOWEB**]({{< relref "/docs/engines/noweb" >}}).
298+
- `messageId` - supports both formats:
299+
- full format: `{true|false}_213213@c.us_AAAAAAA` (any engine)
300+
- plain message id: `3EB0965B123D06E0B70741` (**GOWS** and **NOWEB**)
298301
- `downloadMedia` - download media files (images, files) or not
299302

303+
{{< callout context="note" icon="outline/hand-finger-right" >}}
304+
Combine `all` and **raw message id** in **GOWS** and **NOWEB** engine to fetch message by id:
305+
306+
```bash {title="Get message by id in all chats (GOWS and NOWEB)"}
307+
GET /api/{session}/chats/all/messages/3EB0965B123D06E0B70741
308+
```
309+
310+
{{< /callout >}}
311+
300312
### Pin message
301313

302314
```http request

0 commit comments

Comments
 (0)