Bitbucket
Prefer guided AI setup?
Instead of following these steps manually, you can use the AI Credential Assistant — describe what you want to connect and the AI will walk you through the setup step by step, tailored to your account.
Overview
Connect your Bitbucket account to Nirvai to automate repository management, pull requests, and webhooks.
Supported Authentication Methods
- Repository Access Token - For repository-specific access
- Workspace Access Token - For workspace-wide access
- App Password - Alternative authentication method
Prerequisites
- A Bitbucket Cloud account
- Access to create access tokens or app passwords
Setup Instructions
Option 1: Repository Access Token (Recommended)
- Log in to your Bitbucket account
- Navigate to the repository you want to access
- Go to Repository settings > Access tokens
- Click Create Repository Access Token
- Enter a label for the token (e.g., "Nirvai Integration")
- Select the required scopes:
read:repository- Read repository contentwrite:repository- Push changesread:webhook- Read webhookswrite:webhook- Create/update webhooks
- Click Create
- Copy the token and paste it in Nirvai
Option 2: Workspace Access Token
- Go to your Workspace settings
- Select Access tokens under Security
- Click Create workspace access token
- Enter a label and select required scopes
- Copy and use the token in Nirvai
Option 3: App Password
- Click your avatar > Personal settings
- Go to App passwords under Security
- Click Create app password
- Enter a label and select permissions
- Copy the app password
- Use your Bitbucket username with the app password
Required Scopes
| Scope | Description | Required For |
|---|---|---|
read:user:bitbucket | Read user information | User-related operations |
read:workspace:bitbucket | Read workspace data | Workspace access |
read:repository:bitbucket | Read repository | Repository operations |
write:repository:bitbucket | Write to repository | Push, merge |
read:webhook:bitbucket | Read webhooks | Webhook management |
write:webhook:bitbucket | Create webhooks | Webhook setup |
delete:webhook:bitbucket | Delete webhooks | Webhook cleanup |
Troubleshooting
Common Issues
- 401 Unauthorized: Token may be revoked or expired. Create a new token.
- 403 Forbidden: Token lacks required permissions. Check scope selection.
- Repository not found: Ensure the token has access to the specific repository.
- Rate limiting: Bitbucket has API rate limits. Space out requests if needed.
Token vs App Password
- Access Tokens: Scoped to repository or workspace, more secure
- App Passwords: Account-wide, requires username for authentication
Related Resources
Adapted from n8n documentation for Nirvai platform
Next Steps
Got your credential? Connect it to an agent
Use the AI Tool Creator to turn this credential into agent-callable tools. Describe what your agent should be able to do and the AI investigates the API, configures the endpoints, and gives you a reviewable toolkit before saving anything.