> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datafold.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bitbucket

## 1. Issue an Access Token

### Bitbucket Cloud

To get the [repository access token](https://support.atlassian.com/bitbucket-cloud/docs/create-a-repository-access-token/), navigate to your Bitbucket repository settings and create a new token.

When configuring your token, enable the following permissions:

* **Pull requests** -> **Write**, so that Datafold can post reports with Data Diff results to pull requests.
* **Webhooks** -> **Read and write**, so that Datafold can configure all webhooks that we need automatically.

![](https://mintcdn.com/datafold/hQ4DukKOuaj6vjhH/images/bitbucket_access_token-31e43bcafa70921b2f847623fbc149e5.png?fit=max\&auto=format\&n=hQ4DukKOuaj6vjhH\&q=85\&s=8f59ced50090f42d1c8126a9a816c86a)

Bitbucket Access Token

### Bitbucket Data Center / Server

To get a [repository access token](https://confluence.atlassian.com/bitbucketserver/http-access-tokens-939515499.html), navigate to your Bitbucket repository settings and create a new token.

When configuring your token, enable **Repository admin** permissions.
We need admin access to the repository to be able to post reports with Data Diff results to pull requests, and also configure all necessary webhooks automatically.

![](https://mintcdn.com/datafold/hQ4DukKOuaj6vjhH/images/bitbucket_server_access_token-c2504c12d9bef6081251b9eb6aa0b12b.png?fit=max\&auto=format\&n=hQ4DukKOuaj6vjhH\&q=85\&s=fe7a17de6da297d97624585a9c6415ba)

Bitbucket Server Access Token

## 2. Configure integration in Datafold

Navigate back to Datafold and fill in the configuration form. Set **Deployment** to **Cloud** for Bitbucket Cloud or **Self-hosted** for Bitbucket Data Center / Server.

### Bitbucket Cloud

* **Personal/Project Access Token**: the token you created in step 1.
* **Repository**: your Bitbucket repository name.
  For example, if your Bitbucket project URL is `https://bitbucket.org/datafold/dbt/`, your **Repository** is `datafold/dbt`.

### Bitbucket Data Center / Server

* **Personal/Project Access Token**: the token you created in step 1.
* **Repository**: the full URL of your Bitbucket repository.
  For example, `https://bitbucket.myorg.com/projects/datafold/repos/dbt`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.