Separate the Slack app from each installed workspace
Bothosting’s Slack starters read one installed bot token from Variables. For a small set of separately managed deployments, you can give each its own workspace token, process and allocation. One app serving several workspaces needs OAuth and a way to choose the proper credentials for each incoming event.
Store each installation separately. Preserve the team or enterprise identity and installation type Slack supplies, including the distinction between a workspace install and an organization-wide install. Namespace your application preferences and necessary event processing state by the same tenant identity. Use an isolated development app to test install and disconnect flows.
Register the full HTTPS callback for your Bolt receiver
Use a Node.js or Python HTTP deployment for the OAuth endpoints and select a receiver that supports the OAuth flow. Bind to 0.0.0.0 and SERVER_PORT. Register the full callback in Slack, such as the platform HTTPS origin with Bolt for JavaScript’s default /slack/oauth_redirect path.
Save the OAuth client secret, state secret and the HTTP signing secret in Variables. Keep OAuth state verification enabled and implement a durable installation store with limited access. It needs to store, look up and remove installation information. Bolt for JavaScript OAuth setup.
Verify isolation with two test installations
- Install the app in two test workspaces. Assign a different test channel and preference to each.
- Send an event in each workspace, restart the deployment, and send another event. Check that each reply uses the correct installation and reads its own settings.
- Uninstall from one workspace and check that its credentials and settings are handled according to your removal policy. Confirm the other workspace still works.
If you plan to list the app in the Slack Marketplace, use HTTP event delivery and check Slack’s current distribution requirements. For the underlying store, see persistent Slack bot state.