Connect to Slack

Ask the Community

Allow users to connect to a Slack workspace


Overview #

Calling this method will trigger a popup window to appear containing a flow for the user to link their Cord user to a Slack user. Completion of the flow will additionally connect the user's Slack workspace to their Cord group if that Cord group is not already connected to a Slack workspace. Calling this method will not do anything if the Cord user is already linked to a Slack user.
Vanilla JavaScript:
window.CordSDK.user.connectToSlack({
   onCompleteOAuth: (success) => console.log('Has user successfully signed into Slack: ', success)
});
window.CordSDK.user.connectToSlack({
   onCompleteOAuth: (success) => console.log('Has user successfully signed into Slack: ', success)
});
Copy

What this function returns #

This function returns a promise that resolves to nothing when the Slack connection popup window opens.

Arguments this function takes #


options #

optional
ConnectToSlackOptions

This is an object with the following fields:

Show property details


Not finding the answer you need? Ask our Developer Community

Ask Cordy