Distributing Slack apps
Slack apps start life residing in one workspace. Distribution allows apps to spread their wings and take off for new pastures.
The type of distribution you choose for your app will determine which installation flows you'll need to build.
In this overview, we'll run through the different types of distribution, and explain how to install and authenticate users for each.
- Single-workspace apps
- Apps distributed to multiple workspaces
- Apps distributed via the App Directory
- Uninstallation of apps
When you create your Slack app, you associate it with a workspace. Your app can be installed to its associated workspace) easily with a couple of clicks.
Just open the app dashboard for your app, select the Install App section, and click the Install App to Workspace button.
Single-workspace apps can use the full range of app capabilities, but can't be distributed to any other workspaces.
If your single-workspace app needs to take action on behalf of other users, you'll need to build an OAuth 2.0 flow.
A lot of apps will be completely content staying at home like this—public distribution is a completely optional step that isn't right for every app. Read on to learn why you might want to distribute your app.
Once you've built an authorization flow using OAuth 2.0, your app will be able to generate access tokens for each workspace—and user—on the fly. This is one of the key steps to letting your app roam free.
Once public distribution is enabled, you'll get access to an embeddable Add to Slack button, a shareable URL that kicks off the installation process when clicked, and an HTML meta tag to enable Slack app suggestions.
You can also go a step further and submit your app to the Slack App Directory.
The Slack App Directory lists publicly distributed Slack apps that have been reviewed to ensure they meet high standards of quality and usefulness.
When your app is capable of being distributed to multiple workspaces, there are a few other adjustments you'll need to make to the app before submitting it for App Directory consideration.
If your app is approved for listing in the App Directory, it will gain a listing page. Use this space to tell your app's story, compellingly preview your app's capabilities and user experience, and ultimately attract users. We have some guidelines to help you build a great App Directory page.
Finally, you can take advantage of direct installs, which allow any user to install your app straight from the App Directory in a couple of clicks.
Your app can be purposefully uninstalled at any time from a workspace. Subscribe to the
app_uninstalled event if you want your app to receive a notification when this happens.
Apps will be automatically uninstalled from workspaces under a limited set of circumstances:
- An app that only uses the scopes
identifywill generally not be automatically uninstalled.
- There is one exception to the above: in the app's associated workspace, the app will be uninstalled when the last creator or collaborator leaves the workspace or becomes a guest user.
- Any app that uses scopes beyond those listed above will be automatically uninstalled if the user that installed it leaves the workspace, or becomes a guest user.