In order to connect multiple Slack workspaces to Bitbuckt Bitbucket, use the following steps.
1. All URLs require HTTPS
To reuse the Slack app in multiple workspaces, all of the configured URL URLs are required to use HTTPsHTTPS. Ensure that your Bitbucket can be reached with HTTPS.
...
Go to Slack Apps configuration (https://api.slack.com/apps) and select your Pull Request Analytics app. Then go to Manage Distribution, scroll down and confirm'I’ve “I’ve reviewed and removed any hard-coded information'information”.
Then click Activate Public Distribution. This will not list your app in Slacks Slack's App Directory place. It allows other workspaces to use your App. To install the App, the link to the APP App and Admin permissions on your Bitbucket are still required.
...
In case you forgot to update all URLs to HTTPS, Slack will tell you which one ones still need to be updated.
...
After clicking Allow on the App installation screen, you get an a ‘Client must be authenticated to access this resource’ error. Your You are not logged in into Bitbucket as an Administrator. Log in as Administrator in Bitbucket first, with the same Bitbucket URL as configured in Slack:
...
Error: Something went wrong when authorizing
After clicking Authenticate yourself on the PR Analytics Slack Configuration screen, or clicking Update Access on the PR Analytics account management screen, you get a ‘redirect_uri did not match any configured URIs’ error.
...
Confirm that the passed URI is HTTPS. If it is instead showing HTTP, your Bitbucket server will need to be configured to use HTTPS for redirects.
If the redirect URI is using HTTPS, the problem is likely in the Slack App configuration. Check Slack App → Features → OAuth & Permissions → Redirect URLs, comparing the saved URLs with the redirect URI from the error message. An exact match is not required, but one of the URLs in the Slack App config must be fully included within the Redirect URI. Edit the incorrect URL or Add New Redirect URL to match your redirect URI. When finished, Save URLs.
...