Bitbucket's API applies a number of privilege scopes to endpoints. In order to access an endpoint, a request will need to have the necessary scopes.
Scopes are declared in the descriptor as a list of strings, with each string being the name of a unique scope.
A descriptor lacking the scopes
element is implicitly assumed to require all scopes and as a result, Bitbucket will require end users authorizing/installing the app to explicitly accept all scopes.
Our best practice suggests you add the scopes your app needs, but no more than it needs.
Invalid scope strings will cause the descriptor to be rejected and the installation to fail.
Following is the set of all currently available scopes.
Gives the app read access to all the repositories the authorizing user has access to. Note that this scope does not give access to a repository's pull requests.
Gives the app write (not admin) access to all the repositories the authorizing user has access to. No distinction is made between public or private repos. This scope implies repository
, which does not need to be requested separately.
This scope alone does not give access to the pull requests API.
Gives the app admin access to all the repositories the authorizing user has access to. No distinction is made between public or private repos. This scope does not imply repository
or repository:write
. It gives access to the admin features of a repo only, not direct access to its contents. Of course it can be (mis)used to grant read access to another user account who can then clone the repo, but repos that need to read of write source code would also request explicit read or write.
This scope comes with access to the following functionality:
Gives the app read access to all the snippets the authorizing user has access to. No distinction is made between public and private snippets (public snippets are accessible without any form of authentication).
Gives the app write access to all the snippets the authorizing user can edit. No distinction is made between public and private snippets (public snippets are accessible without any form of authentication). This implies the Snippet Read scope which does not need to be requested separately.
Ability to interact with issue trackers the way non-repo members can. This scope does not imply any other scopes and does not give implicit access to the repository the issue is attached to.
This implies issue
, but adds the ability to transition and delete issues.
This scope does not imply any other scopes and does not give implicit access to the repository the issue is attached to.
Gives access to wikis. No distinction is made between read and write as wikis are always editable by anyone. This scope does not imply any other scopes and does not give implicit access to the repository the wiki is attached to.
Gives the app read access to pull requests and collaborate on them.
This scope implies repository
, giving read access to the pull request's destination repository.
Implies pullrequest
but adds the ability to create, merge, and decline pull requests.
This scope implies repository:write
, giving write access to the pull request's destination repository. This is necessary to facilitate merging.
Gives the app repository
scope permissions for every repository under every project that the authorizing user has read access to.
This scope is deprecated, and has been made obsolete by project:admin
. Please see the deprecation notice here.
Gives the app admin access to all the projects the authorizing user has access to. No distinction is made between public or private projects. This scope does not imply project
, or repository:write
on any repositories under the project. It gives access to the admin features of a project only, not direct access to its repositories' contents.
Ability to see the user's primary email address. This should make it easier to use Bitbucket Cloud as a login provider to apps or external applications.
Ability to see all the user's account information. Note that this does not include any ability to mutate any of the data.
Ability to change properties on the user's account.
Gives access to webhooks. This scope is required for any webhook related operation.
This scope gives read access to existing webhook subscriptions on all
resources you can access, without needing further scopes. This means that
a client can list all existing webhook subscriptions on repository
foo/bar
(assuming the principal user has access to this repo). The
additional repository
scope is not required for this.
Likewise, existing webhook subscriptions for a repo's issue tracker can be
retrieved without holding the issue
scope. All that is required is the
webhook
scope.
However, to create a webhook for issue:created
, the client will need to
have both the webhook
as well as issue
scope.
Rate this page: