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

# conversations_history

> Fetch recent messages from a Slack channel.

<div className="tool-route"><span className="tool-row-method" data-method="GET">GET</span><code>{"https://slack.com/api/conversations.history"}</code></div>

```python slack_conversations_history.py theme={null}
from charter.packs import slack

result = await slack.conversations_history.ainvoke({"channel": ...})
```

<Note>
  Requires `chat:write`, `channels:read`, `groups:read`, `im:read`, `mpim:read`, `channels:history`, `groups:history`, `im:history`, `mpim:history`, `users:read`, `reactions:write`. Pages by cursor: `response_metadata.next_cursor` is sent back as `cursor`.
</Note>

## Query parameters

<div className="reference-table">
  | Field                                                           | Type      | Description                                                                                                                                                                                                                                                |
  | --------------------------------------------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `channel` <span className="required" title="required">\*</span> | `string`  | Conversation ID to fetch history for.                                                                                                                                                                                                                      |
  | `cursor`                                                        | `string`  | Paginate through collections of data by setting this to the next\_cursor attribute returned by a previous request's response\_metadata.                                                                                                                    |
  | `limit`                                                         | `integer` | The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the conversation history hasn't been reached. Maximum of 999. <span className="field-constraints">≥ 1; ≤ 999; defaults to `100`</span> |
  | `oldest`                                                        | `string`  | Only messages after this Unix timestamp will be included in results. Defaults to 0. Seconds, not milliseconds: "1700000000", not "1700000000000". A Slack ts carries a fraction, as in "1405894322.002768".                                                |
  | `latest`                                                        | `string`  | Only messages before this Unix timestamp will be included in results. Default is the current time. Seconds, not milliseconds: "1700000000", not "1700000000000". A Slack ts carries a fraction, as in "1405894322.002768".                                 |
  | `inclusive`                                                     | `boolean` | Include messages with 'oldest' or 'latest' timestamps in results. Ignored unless either timestamp is specified.                                                                                                                                            |
  | `includeAllMetadata`                                            | `boolean` | Return all metadata associated with this message.                                                                                                                                                                                                          |
</div>
