Lesstep
Bitbucket Cloud · Tokens · Checked November 22, 2026

Bitbucket Cloud: API token or access token?

Bitbucket Cloud has two kinds of token that replace app passwords. An Atlassian API token belongs to your account and carries the scopes you gave it. A repository, project or workspace access token belongs to one repository, project or workspace, not to a person, and is meant for scripts and CI. They are sent differently: an API token with your e-mail (REST API) or a Bitbucket user name (Git), an access token as Bearer for the REST API and with the user name x-token-auth for Git.

Side by side

Atlassian API tokenRepository, project or workspace access token
Belongs toYour Atlassian accountOne repository, project or workspace, not a user
Can reachGit and the Bitbucket APIs, within the scopes it was made withOnly its own repository, project or workspace; it cannot log in to bitbucket.org or manage other workspaces, projects or repositories
Created atid.atlassian.com → Security → API tokens, Create API token with scopesSettings → Security → Access tokens, in the repository, project or workspace, Create access token
Expiry1 to 365 days, one year by default"No expiry" or a date; if a workspace admin requires an expiry, a date within the admin's range
ShownOnce, it cannot be recoveredOnce, it cannot be retrieved later
Git over HTTPS: user nameYour Bitbucket user name (case sensitive), or x-bitbucket-api-token-auth, or x-token-authx-token-auth
Git over HTTPS: what it needsread:repository:bitbucket to clone; also write:repository:bitbucket to pushThe Repository Read permission to clone; also Repository Write to push
REST APIHTTP Basic with the e-mail of your Atlassian account; since August 18, 2026 also Authorization: Bearer, without the e-mailAuthorization: Bearer
PlanAnyWorkspace and project tokens are a Premium feature, as Atlassian's pages for them say

Sources: Atlassian's Using API tokens, Manage API tokens, Repository access tokens, Using access tokens, Create a project access token, Create a workspace access token, and the changelog entry for Bearer.

To use either from a JetBrains IDE: Pull Request Inbox for Bitbucket, a plugin for JetBrains IDEs, takes an Atlassian API token with your e-mail, or an access token with the e-mail left empty.

Commands

An API token, REST API, with the e-mail of your Atlassian account:

curl -u 'YOUR_ATLASSIAN_EMAIL:YOUR_API_TOKEN' https://api.bitbucket.org/2.0/user

An access token, REST API (the call is Atlassian's example for a repository token):

curl -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' https://api.bitbucket.org/2.0/repositories/WORKSPACE/REPOSITORY

Git with an API token. Leave the token out of the URL and enter it at the password prompt; Atlassian advises against keeping it in the remote URL:

git clone https://YOUR_BITBUCKET_USERNAME@bitbucket.org/WORKSPACE/REPOSITORY.git

Git with an access token: the user name x-token-auth, the token at the prompt:

git clone https://x-token-auth@bitbucket.org/WORKSPACE/REPOSITORY.git

For a repository access token, Atlassian also says to set the repository's Git user e-mail to BOT_ID@bots.bitbucket.org, where the bot ID is the token's ID, not its name. That address cannot send or receive mail; it only ties Git operations to the token.

Which one

When a token is refused

Bitbucket pull requests in IntelliJ IDEA

Pull Request Inbox for Bitbucket, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, signs in to Bitbucket Cloud's REST API with your Atlassian e-mail and an API token in HTTP Basic; when you leave the e-mail empty, it sends the token as a Bearer token, for a repository, project or workspace access token. It does not use the token for Git: pull, push and checkout go through your Git and its credential helper. The review inbox, diffs and discussions are free; approving, commenting and merging are Pro (US$1.50 a month, with a 30-day trial).

Get it on JetBrains Marketplace

Bitbucket and Atlassian are trademarks of Atlassian; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by Atlassian or JetBrains.

More: "Token is invalid, expired, or not supported for this endpoint" · "Your credentials lack one or more required privilege scopes" · "error: 410" after app passwords · Git Credential Manager 3.0.0 and Bitbucket OAuth · "remote: Invalid username or password" · 日本語