Bitbucket onboarding uses an OAuth consumer for workspace access.
Create the Bitbucket OAuth consumer
- In Bitbucket, open the workspace Settings → OAuth consumers → Add consumer.
- Set the Callback URL to
{{endpoint}}/auth/bitbucket/callback. The Redirect base URL is where users land after successful authorization (typically your tenant app URL). - Enable required permissions:
- Account: Read
- Repositories: Read
- Pull requests: Read
- Webhooks: Read & write
- Save and copy the Key (client ID) and Secret.
Register the provider in Relaymesh (SaaS UI)
- Open Providers in the Relaymesh dashboard.
- Click Add provider → Bitbucket.
- Paste Client ID, Client Secret, and your Webhook secret.
- Save to generate the onboarding URL.
Register via CLI
relaymesh --endpoint https://api.your-domain.com providers create --provider bitbucket --config-file bitbucket.yaml
webhook:
secret: ${BITBUCKET_WEBHOOK_SECRET}
oauth:
client_id: ${BITBUCKET_CLIENT_ID}
client_secret: ${BITBUCKET_CLIENT_SECRET}
Onboarding
Start the onboarding URL from the dashboard to authorize the workspace.
Installations appear under your workspace once the OAuth flow completes. Relaymesh Cloud registers webhooks automatically during onboarding.
Onboarding URL format
{{endpoint}}/?provider=bitbucket&instance={{provider_hash}}&tenant_id={{tenant_id}}&state={{optional_correlation}}
tenant_id is optional for single-tenant usage. state is optional and can be used for correlation.