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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Bitbucket API-Token Authentication failure (Token is invalid or not supported for this endpoint.)

I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Oct 23, 2023


I try to makt the first steps with the Bitbucket API but i fail by the first step. (Frustration is maixmal)
I try to make ue the sample of the documentation and try to use the curl-command:

curl -H "Authorization: Bearer ATATT..."<emailadress X>/<repositoryname>/commits

The result is: Token is invalid or not supported for this endpoint

So how i get the API token:

After i logged into bitbucket with user X, i went to the gear in the top right corner. there i went to "Atlassian account setting" and there to the security tab. on this page i was then able to access the API token creation & management page. I then generated the API token there and used it for the curl command.
I made the token url-capable beforehand (mapped the characters url-compliant). I used exactly the same email address as I used to create the api token.

What am I doing wrong here?

Best regards


1 answer

0 votes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 23, 2023

G'day Lorenzo! 

Welcome to the Bitbucket Cloud community :)

The URL format for API calls against our endpoints actually requires the use of your workspaceID for the repository path rather than your email address, and the call will fail if this is not followed - you can find the repository path via the URL reported in your browser when you browse the repository in question:<workspaceID>/<repositoryname>/commits

I have tested using my own repository and was able to query against it with the use of a bearer token, here is an example of the command that I executed:

curl --request GET \
--url<workspaceID>/<repositoryname>/commits \
--header 'Authorization: Bearer hunbYYd.........'

Hope this helps.


- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events