# Bitbucket

## Prepare for SCM Integration Setup

* Within Threat Center, navigate to Admin-> Settings->Integrations->SCM Integrations.
* Take note of your Redirect URL as you'll need it in the next step.&#x20;

## Create Group Bitbucket OAuth Application

Login to GitLab with a user that has permission to create an application

* Login to your Atlassian or Bitbucket account with a user who has permission to create an application

* If necessary, switch to Bitbucket from the top left Atlassian menu.

* Select the **Settings** cog on the top navigation bar.

* Select **Workspace settings** under **Bitbucket Administration** from the **Settings** dropdown menu.\
  If you're giving access to a workspace, make sure you have administrative access.

* Select **OAuth consumers** under **Apps and Features** on the left navigation sidebar.

* Select **Add consumer**. The **Add OAuth consumer** page appears.

* Enter Name "Threatrix"

* Enter the `Redirect URIfrom the Threatrix dashboard`

* &#x20;Select permissions as shown below

*

```
<figure><img src="https://3093892275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbsieSiu0D66DBFP4uh%2Fuploads%2Fnvq1jopUAH10nTEDLMOL%2Fimage.png?alt=media&#x26;token=4f1ae3ac-f9a3-4196-bd08-17247b3ad326" alt=""><figcaption></figcaption></figure>
```

* Click "Save"

Copy your application ID and Secret as you'll need them for the next step.&#x20;

<figure><img src="https://3093892275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbsieSiu0D66DBFP4uh%2Fuploads%2FsPxuFI9kEvBSIL5kds5T%2Fimage.png?alt=media&#x26;token=fbaa09f4-b94d-4847-9d34-7fc0f2587da7" alt=""><figcaption></figcaption></figure>

## Complete SCM Integration

In Threat Center, SCM Integration,  complete the following fields&#x20;

* Name: Use a unique name that employees will recognize, like your team, group or division. If necessary, add the SCM type if there are more than one in the same group.
* Provider Type: Select BITBUCKET from the&#x20;
* Base URL: This is the URL of your SCM server
* Token URL: The Token URL of your server
* Authorization URL: The authorization URL of your server
* Client ID / Application ID: This is the Application ID or Client ID provided to you when you created your application in your SCM
* Client Secret / Secret: This is the secret provided to you when you created your application in your SCM.

<figure><img src="https://3093892275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbsieSiu0D66DBFP4uh%2Fuploads%2FGvE2bb0zoIZT0nUJvJJ8%2Fimage.png?alt=media&#x26;token=7c11f139-7fe0-42a5-ad1b-d755a64baef2" alt=""><figcaption></figcaption></figure>
