Finish connecting Slack
Redeem the code and state Slack sent the browser back with.
Finish connecting Slack
curl --request POST \
--url https://app.mithunai.com/mithunai/api/v1/integrations/slack/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"state": "<string>"
}
'import requests
url = "https://app.mithunai.com/mithunai/api/v1/integrations/slack/complete"
payload = {
"code": "<string>",
"state": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>', state: '<string>'})
};
fetch('https://app.mithunai.com/mithunai/api/v1/integrations/slack/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));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).
string
required
What Slack sent back as
code.string
required
What Slack sent back as
state.Response
Returns201 and data, as Read the Slack connection does.Last modified on November 7, 2026
Finish connecting Slack
curl --request POST \
--url https://app.mithunai.com/mithunai/api/v1/integrations/slack/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"state": "<string>"
}
'import requests
url = "https://app.mithunai.com/mithunai/api/v1/integrations/slack/complete"
payload = {
"code": "<string>",
"state": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>', state: '<string>'})
};
fetch('https://app.mithunai.com/mithunai/api/v1/integrations/slack/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));