Addon
Branch restrictions
Branching model
Commit statuses
Commits
Deployments
Downloads
Issue tracker
Pipelines
Projects
Pullrequests
Refs
Reports
Repositories
Snippets
Source
Ssh
Users
Webhooks
Workspaces
Other operations

Rate this page:

Users

The users resource allows you to access public information associated with a user account. Most resources in the users endpoint have been deprecated in favor of workspaces.

Get current user

GET /2.0/user

Returns the currently logged in user.

account

Request

There are no parameters for this request.

Example

1
2
3
4
curl --request GET \
  --url 'https://api.bitbucket.org/2.0/user' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Accept: application/json'

Responses

The current user.

Content typeValue
application/json

allOf [object, Account]

List email addresses for current user

GET /2.0/user/emails

Returns all the authenticated user's email addresses. Both confirmed and unconfirmed.

email

Request

There are no parameters for this request.

Example

1
2
3
curl --request GET \
  --url 'https://api.bitbucket.org/2.0/user/emails' \
  --header 'Authorization: Bearer <access_token>'

Responses

Unexpected error.

Content typeValue
application/json

Error

Get an email address for current user

GET /2.0/user/emails/{email}

Returns details about a specific one of the authenticated user's email addresses. Details describe whether the address has been confirmed by the user and whether it is the user's primary address or not.

email

Request

Path parameters
email Required

string

Email address of the user.

Example

1
2
3
curl --request GET \
  --url 'https://api.bitbucket.org/2.0/user/emails/{email}' \
  --header 'Authorization: Bearer <access_token>'

Responses

Unexpected error.

Content typeValue
application/json

Error

Get a user

GET /2.0/users/{selected_user}

Gets the public information associated with a user account.

If the user's profile is private, location, website and created_on elements are omitted.

Note that the user object returned by this operation is changing significantly, due to privacy changes. See the announcement for details.

Request

Path parameters
selected_user Required

string

This can either be the UUID of the account, surrounded by curly-braces, for example: