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

# Finish connecting Slack

> Redeem the code and state Slack sent the browser back with.

Slack sends the browser back to the console with `code` and `state`, and the console sends them
here. The state is spent on first use and must have been issued to the same person in the same
organisation, so a link started by somebody else cannot connect a workspace to yours. The bot
token is saved as a sealed connection and never returned.

Answers `409` when the workspace is connected to another organisation, or yours is connected to a
different workspace (remove that one first).

**code** `string` *required*

What Slack sent back as `code`.

**state** `string` *required*

What Slack sent back as `state`.

## Response

Returns `201` and `data`, as [Read the Slack connection](https://docs.mithunai.com/api-reference/slack/get-slack.md) does.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.