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
-
Sign in to your Bitbucket account.
-
Open your profile menu and navigate to Account Settings.
-
In the settings menu, go to Security.
-
Select API Tokens to manage tokens for programmatic access.
-
Click Create API Token to begin generating a new token.
-
Provide a token name that clearly identifies the purpose of the integration.
-
Set an expiration date to automatically revoke the token after a defined period.
-
Proceed to the token configuration section.
-
Choose Bitbucket API token as the token type.
-
Select the required scopes and permissions depending on your integration needs.
-
Search and add relevant scopes to grant precise access levels for repository operations and API interactions.
-
Review the selected scopes and permissions before generating the token.
-
Click Generate token.
-
Copy the generated token immediately and store it securely.
Bitbucket displays the token only once for security reasons.
Field Reference
| Field | Description | Example |
|---|---|---|
| Token Name | A descriptive name used to identify the token later | DeepTraQ Bitbucket Integration |
| Expiration Date | Defines when the token will automatically expire | 90 days |
| Token Type | Specifies the type of token being created | Bitbucket API Token |
| Scopes | Defines the permissions granted to the token | Repository read, repository write |
| Repository Access | Determines which repository actions the token can perform | Read and Write |