UiPath Documentation
integration-service
latest
false
Integration Service user guide

Bitbucket authentication

Connect UiPath to a Bitbucket Cloud workspace with OAuth 2.0, using your own Bitbucket OAuth consumer.

Before using Bitbucket activities, you must create a connection to your Bitbucket Cloud workspace in UiPath Integration Service.

Important:

The Bitbucket connector only supports Bitbucket Cloud. Bitbucket Data Center and Server are not supported.

Prerequisites​

The Bitbucket connector uses OAuth 2.0 with your own Bitbucket OAuth consumer. There is no authentication type to select: the connection screen asks directly for the fields below.

Create an OAuth consumer in Bitbucket under Workspace settings > Apps and features > OAuth consumers. Learn more. While creating the OAuth consumer, set the callback URL to https://{baseURL}/provisioning_/callback (for example, https://cloud.uipath.com/provisioning_/callback for Automation Cloud).

In the OAuth consumer's permissions, enable every permission that matches a scope in Bitbucket scopes. Bitbucket grants the permissions set on the OAuth consumer, and the connection fails if any of them are missing.

Required fields​

FieldDescription
WorkspaceThe Bitbucket workspace to connect to. The connection is scoped to this workspace and can interact with the projects and repositories in it.
Client IDThe OAuth consumer's key, found under Settings > Workspace settings > Apps and features > OAuth consumers > your OAuth app.
Client secretThe OAuth consumer's secret, found in the same place. It is stored in the UiPath Integration Service database.

Create the connection​

  1. In UiPath Integration Service, add a Bitbucket connection.
  2. Enter your Bitbucket Workspace, and the Client ID and Client secret of your OAuth consumer.
  3. Sign in to Bitbucket and grant the requested permissions when prompted.

Token lifecycle​

Access tokens are short-lived. UiPath uses the refresh token to obtain new access tokens automatically until the refresh token expires or is revoked.

Revoking the connection's access from Bitbucket, or deleting your own OAuth consumer, invalidates existing tokens and requires re-authorization from UiPath.

Troubleshooting​

  • 401 Unauthorized: The connection's tokens may have been revoked. Re-authorize the connection.
  • 403 Forbidden on some operations: Confirm the authenticated Bitbucket account has the required workspace and repository permissions for the target operation.

Bitbucket scopes​

The connection requests the following scopes. They are not shown on the connection screen and you can't change them. Bitbucket grants the permissions set on the OAuth consumer, not the scopes in the request.

ScopeDescription
projectView projects in the workspace.
project:writeCreate and update projects in the workspace.
repositoryView repositories, branches, and commits.
repository:writeCreate and update repositories and branches.
repository:deleteDelete repositories and branches.
repository:adminManage repository settings and permissions.
pullrequestView pull requests.
pullrequest:writeCreate, approve, and merge pull requests.
issueView issues, if the repository's issue tracker is enabled.
issue:writeCreate and update issues, if the repository's issue tracker is enabled.
emailRead the authenticated user's primary email address.

For the authoritative definition of each scope, see Bitbucket's OAuth 2.0 documentation.

Was this page helpful?

Connect

Need help? Support(opens in new window)

Want to learn? UiPath Academy(opens in new window)

Have questions? UiPath Forum(opens in new window)

Stay updated