Skip to main content

Bitbucket: Overview and setup

Manage repositories, pull requests, and code workflows with the Bitbucket integration.

R
Written by Riya Sebastian

Connect Bitbucket to Atomicwork to manage repositories, pull requests, and code workflows through the Bitbucket API.

Use cases

By connecting Bitbucket, your teams can:

  • Manage repositories: Create, update, and manage Bitbucket repositories as part of onboarding or project setup workflows.

  • Automate pull request workflows: Create or update pull requests, manage reviewers, and track PR status from Atomicwork.

  • Track issues: Create and update Bitbucket issues from incident or change management workflows.

  • Custom operations: Execute any Bitbucket API call for workflows beyond standard actions.

Permissions

To connect Bitbucket to Atomicwork, you need:

  • Org admin access in Atomicwork

  • Admin access to your Bitbucket workspace with permission to create OAuth consumers

The integration authenticates via OAuth 2.0. Scopes are configured on the Bitbucket OAuth consumer. Based on the operations you plan to use, configure the consumer with:

Permission

Purpose

repository:admin

Full repository access — create, update, delete repositories, and manage settings.

repository:read

Read-only access to repositories for listing and retrieving repository data.

issue:write

Create and update issues in Bitbucket repositories.

pullrequest:write

Create and manage pull requests.

Setup

  • Navigate to Settings > App Store > Bitbucket.

  • Click Connect to initiate the OAuth flow.

  • Sign in with your Bitbucket account and authorize the integration.

  • Once authorized, the integration is active.

Supported workflow actions

Action

Description

Call API

Make a generic API call to any Bitbucket endpoint. Use this for all repository, pull request, issue, and user management operations.

Note: Bitbucket currently supports the Call API action, which gives you full access to the Bitbucket REST API. Refer to the Bitbucket API documentation for available endpoints.

Troubleshoot common issues

Error

Cause

Resolution

Failed to get token

Token acquisition failed — client credentials may be incorrect or the redirect URI doesn't match.

Verify the OAuth consumer configuration in Bitbucket and re-initiate the connection.

Failed to parse token response

The OAuth response from Bitbucket could not be processed.

Check the OAuth consumer setup in Bitbucket and re-authenticate.

Token refresh failure

The refresh token has expired. Bitbucket rotates refresh tokens on each refresh — if a rotation was missed, the token chain is broken.

Re-authenticate the integration from Settings > App Store > Bitbucket.

Did this answer your question?