Skip to main content

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​

  1. Log in to your Bitbucket account
  2. Navigate to the repository you want to access
  3. Go to Repository settings > Access tokens
  4. Click Create Repository Access Token
  5. Enter a label for the token (e.g., "Nirvai Integration")
  6. Select the required scopes:
    • read:repository - Read repository content
    • write:repository - Push changes
    • read:webhook - Read webhooks
    • write:webhook - Create/update webhooks
  7. Click Create
  8. Copy the token and paste it in Nirvai

Option 2: Workspace Access Token​

  1. Go to your Workspace settings
  2. Select Access tokens under Security
  3. Click Create workspace access token
  4. Enter a label and select required scopes
  5. Copy and use the token in Nirvai

Option 3: App Password​

  1. Click your avatar > Personal settings
  2. Go to App passwords under Security
  3. Click Create app password
  4. Enter a label and select permissions
  5. Copy the app password
  6. Use your Bitbucket username with the app password

Required Scopes​

ScopeDescriptionRequired For
read:user:bitbucketRead user informationUser-related operations
read:workspace:bitbucketRead workspace dataWorkspace access
read:repository:bitbucketRead repositoryRepository operations
write:repository:bitbucketWrite to repositoryPush, merge
read:webhook:bitbucketRead webhooksWebhook management
write:webhook:bitbucketCreate webhooksWebhook setup
delete:webhook:bitbucketDelete webhooksWebhook 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

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.