Disconnect from Slack

Allow users to disconnect their group from a Slack workspace


Overview #

This method will disconnect the Slack workspace from the Cord group. This means all users who were connected to Slack will also be disconnected.
Vanilla JavaScript:
window.CordSDK.user.disconnectSlackWorkspace({
   onDisconnect: (success) => console.log('User successfully disconnected: ', success)
});
window.CordSDK.user.disconnectSlackWorkspace({
   onDisconnect: (success) => console.log('User successfully disconnected: ', success)
});
Copy

What this function returns #

A promise that resolves to true if the operation succeeded or rejects if it failed.

Arguments this function takes #


options #

optional
DisconnectSlackWorkspaceOptions

This is an object with the following fields:


onDisconnect #

optional
(success: boolean) => void
The argument passed to the callback will tell you whether the user has successfully disconnected.

groupID #

optional
string
The group the user will disconnect the Slack workspace from. The viewer must be a member of the group in order for the disconnection flow to trigger.

Ask Cordy