Bitbucket Access Token API Credential Incorrect

Describe the problem/error/question

The Bitbucket Access Token API Credential is not setup correctly for how the API expects the authorization to connect. The API requires a User Name and Access Token used as Authorization Bearer: AdfD...

Bitbucket API URL: https://api.bitbucket.org/2.0/repositories/{username}

Sample call:
curl --location ‘https://api.bitbucket.org/2.0/repositories/{username}’
–header ‘Authorization: Bearer AdfD...

What is the error message (if any)?

Couldn’t connect with these settings

Authorization failed - please check your credentials

Please share your workflow

n/a

Information on your n8n setup

  • n8n version: 1.123.5
  • Database (default: SQLite): PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ubuntu 22.04.5 LTS
1 Like

Hi, @b_rom Bitbucket does not accept Personal Access Tokens as Bearer tokens.
Even when using an access token, Bitbucket requires Basic Authentication, where the token is used as the password together with the username. n8n is currently sending the token using the wrong authorization scheme, which is why the API rejects the connection.
solution: Use HTTP Basic Auth with your Bitbucket username and the access token as the password.

@b_rom Hey, I think you need to configure the http node properly, please check the below images of how to do so: