Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Accessing Bibucket license details API calls.

Hi Team,

We are trying to fetch the license details of our Bitbucket product through API calls using Personal Access tokens.

we are getting 401 Unauthorized access error.Please find the error details.

The remote server returned an error: (401) Unauthorized.

API Used: https://bitbuckethosturl/rest/api/1.0/admin/license

I have created the token for an admin account.we are able to view the license details in the UI but when tried through API we are getting above exception.

Please let us know how we can fix this authentication issue. Let me know if anything  i need to change in my settings.

Awaiting for your reply.


1 answer


My experience with Bitbucket REST API is that personal access tokens cannot be used with administrator related REST endpoints.

I am not sure why.

So, for admin related REST endpoints basic auth may be the way to go but not ideal. I would prefer personal access tokens over basic auth.

Basic AUTH:

curl -v -X GET -u admin-username:password https://bitbuckethosturl/rest/api/1.0/admin/license

Response HTTP 200 with license info.

Personal access token:  

curl -v -X GET -H "Authorization: Bearer MTQ1NTY0MDA4OTEwOtAOXXXXXXXXX" https://bitbuckethosturl/rest/api/1.0/admin/license

Response HTTP 401

Bitbucket access tokens and Bitbucket


Lasse Langhorn

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,922 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you