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

0 votes
nc-jeng
April 21, 2026

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events