Forums

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

cannot use bitbucket api token to call conflict endpoint

Gia Gao
June 23, 2026

bitbucket.pngbitbucket2.png

I used bitbucket API token to call conflicts endpoint, but it returns 403, I have assigned all scope in the bitbucket list but still not working.

It works well for other bitbucket endpoints

bitbucket3.png

Is it a bug? or I need other way to call conflicts endpoint?

2 answers

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 25, 2026

Hi @Gia Gao

Welcome to the community.

To use access tokens, you will need to use it as an authorization bearer header instead of basic authorization.

Here's an example curl command:

curl --request GET \
  --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repository}' \
  --header 'Authorization: Bearer <repository_access_token>' \
  --header 'Accept: application/json'

Regards,
Mark C

Gia Gao
June 26, 2026

Hi Mark, thanks for the reply. 

I have tried with bearer type, but still not working, and I am not using the repository access token, I am using the API token for calling the bitbucket API, I assume they are different things.

屏幕截图 2026-06-26 175503.png

Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 2, 2026

Hi @Gia Gao

I see. Could you try the Curl command mentioned here instead?

curl --request POST \
 --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repository}/commits' \
 --user '{atlassian_account_email}:{api_token}' \
 --header 'Accept: application/json'


Regards,
Mark C

Gia Gao
July 6, 2026

Hi @Mark C 

I tried with curl command, it works and returns 302 found, but I don't understand why it is still not working in postman though I am using exactly the same headers. Is there anything I missed?

conflict test.png

conflict test2.png

0 votes
Kristian Walker _Adaptavist_
Community Champion
June 23, 2026

Hi Gia,

I have clicked the Request Assistance button so that Atlassian support can look into this issue for you.

I hope this helps.

Regards,

Kristian

Gia Gao
June 23, 2026

Thanks!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events