Updated: February 25, 2025

Bitbucket API Token

This guide explains how to add a Bitbucket API token to Enji to allow the platform to collect data from Bitbucket repositories.

Repositories

The Bitbucket token is composed of key and secret values, separated by a space. Here are instructions on how to obtain these values:

1. Open Bitbucket and navigate to the list of workspaces: https://bitbucket.org/account/workspaces/.

2. Select the necessary workspace and go to Settings → Workspace settings in the console.

3. In the sidebar, under Apps and Features, select OAuth consumers.

4. Click on Add consumer.

5. Complete or select the following fields:

  • Name: Any unique name within this workspace.
  • Callback URL: https://enji.ai/.
  • This is a private consumer: Check this box.
  • Account: read.
  • Pipelines: read.
  • Pull requests: read.

6. Click "Save." The system will generate a key and a secret value.

Construct the token by placing the values in the following order: < key > space < secret >. Insert this token in Enji → Project → Project Settings → Repository.

The token provides access to all repositories in a Bitbucket Workspace.
For more details on creating an OAuth consumer, visit Bitbucket Documentation.