# Bitbucket API Token Generation

Before you configure Bitbucket integration with Avo Assure, generate an API token in Bitbucket. This token allows Avo Assure to authenticate securely with Bitbucket.

To generate a Bitbucket API token, perform the following steps:

1. Go to the Bitbucket website and sign in using the credentials provided by your organization.
2. Select the **Settings** icon in the upper-right corner.
3. Click **Settings** icon, located on the right side of the **Bitbucket** window.
4. Select **Workspace settings**.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FYrlrhPN04SpLkzp54W69%2Fimage.png?alt=media&#x26;token=fded9722-3f27-4f72-820d-4ae314dd9bc1" alt=""><figcaption></figcaption></figure>

4. Select **Access tokens** in the workspace settings.
5. Select **Create access token**.

{% hint style="info" %}
**Note**: You can view previously generated access tokens in the **Workspace access tokens** table.
{% endhint %}

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FgYx9sn1bPN397OcLQ417%2Fimage.png?alt=media&#x26;token=596ed8ab-b303-43fa-b2e1-8b6eb2c154fe" alt=""><figcaption></figcaption></figure>

6. Enter a name for the API token and select the required **Scopes**.

{% hint style="info" %}
**Note**: In the Scope section, you can select the required checkboxes to access various permission&#x73;*.*
{% endhint %}

7. Select **Create** to generate the token.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FiIdnpTjeU9WJ8qh33KAX%2Fimage.png?alt=media&#x26;token=d6796274-4658-402b-bf4a-33ece6f10f95" alt=""><figcaption></figcaption></figure>

You can view the generated access token in the confirmation dialog.

{% hint style="info" %}
**Note**: Copy the token and save it for later use.
{% endhint %}

## Getting Repository URL in Bitbucket

To copy the repository URL from Bitbucket, perform the following steps:

1. On the Bitbucket website, select the **Repositories** page on the home page.
2. Select the **Repository** from the column.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FglqinueAZFP0CmAVoILL%2Fimage.png?alt=media&#x26;token=c7503912-b38d-4a7c-84ec-b8dd88830edd" alt=""><figcaption></figcaption></figure>

4. Select the **Source** option, and select **Clone** in the top-right corner of the Source page.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FLXxUTr3vEgVhXIziJUVf%2Fimage.png?alt=media&#x26;token=ba4e263a-c9e0-47f4-b9d7-630b59a39846" alt=""><figcaption></figcaption></figure>

5. Select the **Copy** icon to copy the repository URL.

{% hint style="info" %}
**Note**: When copying the URL, remove the first two words (git clone) and copy only the remaining URL. Save it in a notepad for use during integration.
{% endhint %}

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2F1GH1tG4AflXALC3TCj3M%2Fimage.png?alt=media&#x26;token=b1385578-304d-4f1e-bda0-4d4812fc0530" alt=""><figcaption></figcaption></figure>

## Getting Username in Bitbucket

To get your Bitbucket username, perform the following steps:

1. Select the **Settings** icon in the upper-right corner.
2. Select **Personal Bitbucket settings**.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FcpTcUDTaSeSIjvRxvmY9%2Fimage.png?alt=media&#x26;token=9048558c-2dc1-4d8c-bcbf-cc39e6484ef1" alt=""><figcaption></figcaption></figure>

3. Select **Account settings**, and copy the **Username** shown in the Account settings page.

{% hint style="info" %}
**Note**: Copy the username and save it in a notepad for use during integration.
{% endhint %}

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FVSHsLmUDC54ZwdAeNx2Y%2Fimage.png?alt=media&#x26;token=0dbd1ae7-1fe6-468d-bd27-a74b95032e89" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.avoautomation.com/integrations-in-avo-assure/bitbucket/bitbucket-api-token-generation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
