Skip to main content

Overview

This guide explains how to generate a scoped API token in Bitbucket for securely integrating your repositories with DeepTraQ or other automation tools. Scoped API tokens allow precise control over the permissions granted to integrations, ensuring that applications only receive the access they require.

Using scoped tokens improves security by enabling:

  • Fine-grained permission control through scopes
  • Secure authentication for API access
  • Automated integrations with development tools
  • Token expiration for better credential management

Follow the steps below to create a secure Bitbucket API token for your integration.

Supported Platforms

  • Bitbucket repositories

Prerequisites

  • A Bitbucket account with access to the target repositories
  • Permission to access Account Settings
  • Repository access to the projects you intend to integrate

Steps

  1. Sign in to your Bitbucket account.

  2. Open your profile menu and navigate to Account Settings.

  3. In the settings menu, go to Security.

  4. Select API Tokens to manage tokens for programmatic access.

  5. Click Create API Token to begin generating a new token.

  6. Provide a token name that clearly identifies the purpose of the integration.

  7. Set an expiration date to automatically revoke the token after a defined period.

  8. Proceed to the token configuration section.

  9. Choose Bitbucket API token as the token type.

  10. Select the required scopes and permissions depending on your integration needs.

  11. Search and add relevant scopes to grant precise access levels for repository operations and API interactions.

  12. Review the selected scopes and permissions before generating the token.

  13. Click Generate token.

  14. Copy the generated token immediately and store it securely.
    Bitbucket displays the token only once for security reasons.

Field Reference

FieldDescriptionExample
Token NameA descriptive name used to identify the token laterDeepTraQ Bitbucket Integration
Expiration DateDefines when the token will automatically expire90 days
Token TypeSpecifies the type of token being createdBitbucket API Token
ScopesDefines the permissions granted to the tokenRepository read, repository write
Repository AccessDetermines which repository actions the token can performRead and Write