The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket API calls return 401

nc-jeng
April 21, 2026

I'm trying to set up a pipeline in Bitbucket to create upmerges to master after having pushed to a hotfix branch. For that the pipeline should be able to read repositories and create PRs. Though, I stumble into a 401 UNAUTHORIZED status code when I try do any Bitbucket API calls. Both in the pipeline but also when I curl a call via my terminal (I have tried to make a token with all scopes to curl this but that also gave me a 401: curl -u jengnc:[TOKEN] https://api.bitbucket.org/2.0/user).

I have tried with several tokens:

* API Token (where I have selected the relevant scopes)
* Workspace access tokens (where I have selected relevant scopes as well).

Do you know if there are any issues with all this or am I missing to do something? Hints to debugging would also be very appreciated.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
nc-jeng
April 21, 2026

SOLVED! I should have used my email as username instead.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events