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

# Bitbucket OAuth 2.0 (Legacy) connector profile – StackOne setup guide

> Set up the OAuth 2.0 (Legacy) connector profile for Bitbucket in StackOne. One-time admin setup required before your users can link Bitbucket accounts via Hub.

<Warning>Administrator access to a Bitbucket workspace is required to create an OAuth consumer. The Account Read permission is required for the connection to work.</Warning>

<section data-guide-section data-guide-scopes="">
  <h2>Creating an OAuth Consumer</h2>

  <p>To connect Bitbucket with StackOne, you'll need to create an OAuth consumer from your workspace settings.</p>

  <Steps>
    <Step title="Access Workspace Settings">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Sign in to your <a href="https://bitbucket.org/account/signin/" target="_blank" rel="noopener noreferrer">Bitbucket account</a>.</p>

        <ul>
          <li>Select your avatar/profile from the top navigation</li>
          <li>Choose your workspace from Recent workspaces or All workspaces</li>
          <li>Click the Settings cog icon</li>
          <li>Select Workspace settings from the dropdown</li>
        </ul>
      </div>
    </Step>

    <Step title="Navigate to OAuth Consumers">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>In the left sidebar, expand the <strong>Apps and features</strong> section, then click <strong>OAuth consumers</strong>.</p>
      </div>
    </Step>

    <Step title="Add a New Consumer">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Click the <strong>Add consumer</strong> button to create a new OAuth application.</p>

        <ul>
          <li><strong>Name</strong>: Enter a unique name (e.g., StackOne Integration)</li>
          <li><strong>Description</strong>: Optional description of the integration</li>
          <li><strong>Callback URL</strong>: Enter `https://api.stackone.com/connect/oauth2/bitbucket/callback`</li>
          <li><strong>URL</strong>: Optional link to your application</li>
        </ul>
      </div>
    </Step>

    <Step title="Configure Permissions">
      <div data-guide-step data-guide-scopes="account,account:write,repository,repository:write,repository:admin,repository:delete,pullrequest,pullrequest:write,project,project:admin,pipeline,pipeline:write,pipeline:variable" data-guide-display-scopes-list="account,account:write,repository,repository:write,repository:admin,repository:delete,pullrequest,pullrequest:write,project,project:admin,pipeline,pipeline:write,pipeline:variable">
        <p>Select the required OAuth permissions for your integration based on which Bitbucket resources you need to access. Permissions are configured on the OAuth consumer and cannot be changed per authorization request.</p>

        <ul>
          <li><strong>Account</strong> (Required): Read permission is required for the connection. Selecting Account Read automatically enables Account Email as a dependency. Write is optional (modify account properties).</li>
          <li><strong>Projects</strong>: Read (view projects and repositories), Admin (full admin access)</li>
          <li><strong>Repositories</strong>: Read, Write, Admin (view/edit permissions, deploy keys), Delete</li>
          <li><strong>Pull requests</strong>: Read (view pull requests), Write (create, merge, and decline pull requests)</li>
          <li><strong>Pipelines</strong>: Read (view pipelines and environments), Write (stop, rerun, trigger), Edit variables (create pipeline variables)</li>
          <li>Select only the permissions required for your specific integration needs</li>
        </ul>

        <div style={{ marginTop: '8px' }} data-guide-display-scopes>
          <div className="connector-guide-scopes-container connector-guide-scopes-container--scrollable">
            <ul className="not-prose" style={{ listStyleType: "'- '", paddingLeft: '1em', margin: 0 }}>
              <li style={{ overflowWrap: 'anywhere', wordBreak: 'break-word' }} data-guide-display-scope="account">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy account" title="Copy scope" data-copy="account">
                  <span className="connector-guide-scope-copy__label">account</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>

              <li style={{ overflowWrap: 'anywhere', wordBreak: 'break-word' }} data-guide-display-scope="account:write">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy account:write" title="Copy scope" data-copy="account:write">
                  <span className="connector-guide-scope-copy__label">account:write</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>

              <li style={{ overflowWrap: 'anywhere', wordBreak: 'break-word' }} data-guide-display-scope="repository">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy repository" title="Copy scope" data-copy="repository">
                  <span className="connector-guide-scope-copy__label">repository</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>

              <li style={{ overflowWrap: 'anywhere', wordBreak: 'break-word' }} data-guide-display-scope="repository:write">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy repository:write" title="Copy scope" data-copy="repository:write">
                  <span className="connector-guide-scope-copy__label">repository:write</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>

              <li style={{ overflowWrap: 'anywhere', wordBreak: 'break-word' }} data-guide-display-scope="repository:admin">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy repository:admin" title="Copy scope" data-copy="repository:admin">
                  <span className="connector-guide-scope-copy__label">repository:admin</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>

              <li style={{ overflowWrap: 'anywhere', wordBreak: 'break-word' }} data-guide-display-scope="repository:delete">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy repository:delete" title="Copy scope" data-copy="repository:delete">
                  <span className="connector-guide-scope-copy__label">repository:delete</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>

              <li style={{ overflowWrap: 'anywhere', wordBreak: 'break-word' }} data-guide-display-scope="pullrequest">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy pullrequest" title="Copy scope" data-copy="pullrequest">
                  <span className="connector-guide-scope-copy__label">pullrequest</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>

              <li style={{ overflowWrap: 'anywhere', wordBreak: 'break-word' }} data-guide-display-scope="pullrequest:write">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy pullrequest:write" title="Copy scope" data-copy="pullrequest:write">
                  <span className="connector-guide-scope-copy__label">pullrequest:write</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>

              <li style={{ overflowWrap: 'anywhere', wordBreak: 'break-word' }} data-guide-display-scope="project">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy project" title="Copy scope" data-copy="project">
                  <span className="connector-guide-scope-copy__label">project</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>

              <li style={{ overflowWrap: 'anywhere', wordBreak: 'break-word' }} data-guide-display-scope="project:admin">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy project:admin" title="Copy scope" data-copy="project:admin">
                  <span className="connector-guide-scope-copy__label">project:admin</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>

              <li style={{ overflowWrap: 'anywhere', wordBreak: 'break-word' }} data-guide-display-scope="pipeline">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy pipeline" title="Copy scope" data-copy="pipeline">
                  <span className="connector-guide-scope-copy__label">pipeline</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>

              <li style={{ overflowWrap: 'anywhere', wordBreak: 'break-word' }} data-guide-display-scope="pipeline:write">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy pipeline:write" title="Copy scope" data-copy="pipeline:write">
                  <span className="connector-guide-scope-copy__label">pipeline:write</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>

              <li style={{ overflowWrap: 'anywhere', wordBreak: 'break-word' }} data-guide-display-scope="pipeline:variable">
                <button type="button" className="connector-guide-scope-copy" aria-label="Copy pipeline:variable" title="Copy scope" data-copy="pipeline:variable">
                  <span className="connector-guide-scope-copy__label">pipeline:variable</span>
                  <span className="connector-guide-scope-copy__icon" aria-hidden="true">⧉</span>
                </button>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </Step>

    <Step title="Save and Retrieve Credentials">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Click <strong>Save</strong> to create the OAuth consumer. After saving, you will be redirected to the OAuth consumers list.</p>

        <ul>
          <li>Click the chevron arrow (›) next to your consumer name to expand and reveal the credentials</li>
          <li>The Key is your Client ID</li>
          <li>The Secret is your Client Secret</li>
          <li>Copy both values and store them securely for use later</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

## Creating the StackOne Connector Profile

To create the Connector Profile in StackOne for <strong>Bitbucket</strong>:

<Steps>
  <Step title="Navigate to Connector Profiles">
    Login to StackOne and navigate to [Connector Profiles](https://app.stackone.com/connector_profiles)
  </Step>

  <Step title="Create New Connector Profile">
    <ul>
      <li>Click <strong>+ Connector Profile</strong></li>
      <li>Search for and select <strong>Bitbucket</strong></li>
      <li>Select <strong>Type</strong> as <strong>OAuth 2.0 (Legacy)</strong></li>

      <li>
        Fill out the fields using details retrieved from your provider:

        <ul style={{ marginLeft: '20px' }}>
          <li><strong>Client ID</strong></li>
          <li><strong>Client Secret</strong></li>
        </ul>
      </li>

      <li>(Optional) Select <strong>Actions</strong> to be enabled for this Connector Profile</li>
      <li>Click <strong>Create profile</strong></li>
    </ul>
  </Step>
</Steps>

Congratulations! The new Connector Profile will now show up in your project ready to be used. You can now continue to <a href="/connect/managing-connectors/linking-accounts">Link Accounts</a> for <strong>Bitbucket</strong>.
