Forums

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

How to Download Artifacts of the Most Recent Successful Build Using Bitbucket Access Token

Deya Sanchez
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 11, 2025

I'm aware that I can curl with username and password to download an artifact, but how can I do this with a Bitbucket Access Token?

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 12, 2025

Hi Deya and welcome to the community!

I'm a bit confused by what you mean when you say artifact. Your post's title mentions builds; however, there are is no API endpoint to get artifacts of a Pipelines build.

Are you uploading files to the Downloads section of a Bitbucket repo and downloading them from there? If so, a sample call with curl and an access token is the following:

curl -s -L -O -H "Authorization: Bearer {access_token}" https://api.bitbucket.org/2.0/repositories/{workspace-id}/{repo-slug}/downloads/{filename}

Replace:

  • {access_token} with the value of the access token
  • {workspace-id} with the ID of the workspace where the repo belongs
  • {repo-slug} with the slug of the repo where the file is uploaded

Please feel free to reach out if you have any questions.

Kind regards,
Theodora

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