Bitbucket "This API is not accessible by this authentication mechanism"
The request was signed with a repository, project or workspace access token, and the endpoint answers for more than that one place. Atlassian's knowledge base explains that these tokens are valid only in the workspace where they were created, so an endpoint that gathers information from several workspaces refuses them (This API is not accessible by this authentication mechanism).
What it looks like
{"type": "error", "error": {"message": "This API is not accessible by this authentication mechanism"}}
The knowledge base shows it for the list of the user's workspaces. Atlassian's pages on each kind of access token set the same bounds: a repository access token works only in its repository, a project access token in its project and its repositories, and a workspace access token in its workspace (Access tokens for a repository, for a project, for a workspace).
For pull requests, too: Pull Request Inbox for Bitbucket, a plugin for JetBrains IDEs, signs in to Bitbucket Cloud with an Atlassian API token or an access token.
Sign in another way
- An API token with your Atlassian account email, sent as HTTP Basic. The knowledge base names the scopes read:user:bitbucket and read:workspace:bitbucket for the list of your workspaces.
- OAuth with the authorization code grant and the account scope, the other way the knowledge base gives.
curl --user 'you@example.com:{api_token}' \
https://api.bitbucket.org/2.0/user/workspaces
The REST API wants your Atlassian email here, not your Bitbucket username; Git over HTTPS is the other way round ("remote: Invalid username or password").
GET /2.0/workspaces is gone
The knowledge base's example calls GET /2.0/workspaces. On November 10, 2026 that address answered 404, "There is no API hosted at this URL". The REST API reference now lists GET /2.0/user/workspaces, "List workspaces for the current user", which also says for each workspace whether you are an administrator (Workspaces).
Or keep the access token in its one place
A script that only works in one workspace, project or repository can keep its access token: call the addresses inside it, such as /2.0/repositories/{workspace}/{repository}/pullrequests, and leave out the ones about you or your workspaces. The access token goes as a Bearer token, and Git takes it with the username x-token-auth (Using access tokens for a repository):
curl --header 'Authorization: Bearer {access_token}' \
https://api.bitbucket.org/2.0/repositories/{workspace}/{repository}/pullrequests
Bitbucket pull requests in IntelliJ IDEA
Pull Request Inbox for Bitbucket, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the pull requests that wait for your review in an IDE tool window. It signs in to Bitbucket Cloud with an Atlassian API token (your Atlassian email and the token) or a repository, project or workspace access token, sent as a Bearer token. The review inbox, diffs, discussions and merge checks are free; creating, approving, commenting and merging are Pro, with a 30-day trial. It also works with Bitbucket Data Center (beta).
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: "Your credentials lack one or more required privilege scopes" · "Token is invalid, expired, or not supported" · Rate limit for this resource has been exceeded · Bitbucket pull requests from the command line · 日本語