How to find Bitbucket Account UUID?
Asked Answered
N

7

8

Since bitbucket no longer supported the use of username. We must instead use User uuid for accessing the bitbucket api's.

Depreciated or Earlier

https://api.bitbucket.com/2.0/users/udayRatan

Latest

https://api.bitbucket.com/2.0/users/558050:c0b72ad0-1cb5-4018-9cdc-0cde8492c443

Numeration answered 31/12, 2018 at 5:33 Comment(3)
Yes, and you provided a link to a JSON data that includes the UUID. What real life programming problem is in question?Curtiscurtiss
I cant find the bitbucket uuid in bitbucket.org account setting or anywhere. So i need to find the bitbucket account uuid for accessing the api'sNumeration
Hey @RatanUdayKumar, any luck so far on the issue?Barham
B
6

You can make a GET request for a repository that you own and see your UUID listed under the owner attribute:

curl https://api.bitbucket.org/2.0/repositories/1team/moxie

Or you could possibly make a GET request for all team members of a team you're a part of and see their UUID's there

curl https://api.bitbucket.org/2.0/teams/1team/members

Info taken from https://developer.atlassian.com/bitbucket/api/2/reference/meta/uri-uuid#repo-obj

Barham answered 31/12, 2018 at 6:21 Comment(1)
What do you mean "1team" for teamname? What if the repo does not belong to a team? And what to you mean "moxie" for repo-name? Is it just the name of repo, such as "my-xx-application"? What if other people have the same repo-name?Numismatist
C
9
  1. Inspect your https://bitbucket.org/account/settings/
  2. Search "uuid" in your browser inspector element
  3. Enjoy your personal information (including uuid)
Coercion answered 22/7, 2021 at 9:21 Comment(0)
B
6

You can make a GET request for a repository that you own and see your UUID listed under the owner attribute:

curl https://api.bitbucket.org/2.0/repositories/1team/moxie

Or you could possibly make a GET request for all team members of a team you're a part of and see their UUID's there

curl https://api.bitbucket.org/2.0/teams/1team/members

Info taken from https://developer.atlassian.com/bitbucket/api/2/reference/meta/uri-uuid#repo-obj

Barham answered 31/12, 2018 at 6:21 Comment(1)
What do you mean "1team" for teamname? What if the repo does not belong to a team? And what to you mean "moxie" for repo-name? Is it just the name of repo, such as "my-xx-application"? What if other people have the same repo-name?Numismatist
R
1

I can't believe it could be this hard to get my own UUID. The way i fixed it was to create a public repo and then run this curl command

curl https://api.bitbucket.org/2.0/repositories/<bitbucketusername>/testrepo

the ouput contained my UUID. I then obviously deleted the unsafe public repo.

Ruby answered 7/7, 2020 at 17:8 Comment(0)
K
0

When using authenticated access you can make a GET request to /2.0/user and you will get the authenticated user's information:

$ curl -H "Authorization: Bearer $TOKEN" https://api.bitbucket.org/2.0/user

You need the value of account_id to access the API resources.

From: https://developer.atlassian.com/bitbucket/api/2/reference/resource/user

Kooima answered 4/9, 2019 at 9:45 Comment(1)
What's the value $TOKEN in this request? Where do you get it from?Auspice
S
0

On the BitBucket repository page, and in the Pull Requests view, you can filter PRs by yourself and check the URL for the author query parameter.

i.e https://bitbucket.org/workspace/repository/pull-requests/?state=ALL&author=%7B<UUID>%7D

Stonedead answered 2/1, 2024 at 9:16 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Valente
L
0

This is old. but what worked for me is, following. Ask user to run this in their browser and it will show their uuid.

https://bitbucket.org/!api/2.0/user

Lashundalasker answered 2/7, 2024 at 17:51 Comment(0)
P
-1

See your bitbucket repository/admin. Click to advance.

ex: https://bitbucket.org/seunggabi/test/admin

enter image description here

Psychopharmacology answered 5/8, 2023 at 13:11 Comment(1)
That is not the UUID of the user but that of the repository.Janina

© 2022 - 2025 — McMap. All rights reserved.