Hello Bitbucket Support Team,
We are facing an authentication issue with Bitbucket REST API. We are trying to integrate Bitbucket with an AWS Lambda function to fetch PR and pipeline data for our internal DevOps chatbot.
Problem: All API calls return 401 Unauthorized, regardless of the authentication method used.
What we have tried:
- HTTP Access Token (Bearer): Generated from Repository Settings → Access tokens. Returns 401.
- Basic Auth (email + App Password): The "App passwords" option is not visible in our Bitbucket account settings. We cannot find it under Personal Settings.
- Basic Auth (email + HTTP Access Token): Also returns 401.
Our setup:
- Workspace:
tracxsystems - Account email:
penny@tracxsystems.com - API being called:
<a href="https://api.bitbucket.org/2.0/repositories/tracxsystems" target="_blank" rel="nofollow noopener noreferrer">https://api.bitbucket.org/2.0/repositories/tracxsystems</a> - Authentication headers tested:
Authorization: Bearer <token> and Authorization: Basic <base64(email:token)><br>
Questions:
- Why is "App passwords" not available in our account settings?
- Is our account on Bitbucket Cloud or Bitbucket Data Center? (Authentication methods differ)
- What is the correct way to authenticate REST API calls for our workspace?
Please advise on the correct authentication method for our account.
Thank you,
Penny
Tracxsystems DevOps Team