Forums

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

Getting 404 while downloading the zip file from our application

Monish Kandriga
November 7, 2025

we are using authorization token and trying to download a zip file from bitbucket repository (used api endpoint, please see sample below), and we are getting a 404 error (when trying to download the file using httpsclient from our application)

We are able to validate the user_email:token and bitbucket api url by using the curl command. Able to download the zip file using the curl command.

Sample api endpoint: 

https://api.bitbucket.org/2.0/repositories/{workspace}/{repository}/src/master/{file_name.zip}

Working curl command:
curl -u "$BB_USERNAME:$BB_TOKEN" \
-L \
-o file_name.zip \
https://api.bitbucket.org/2.0/repositories/{workspace}/{repository}/src/master/{file_name.zip}

Could you please review and let me know your comments?

Thanks,
Monish

1 answer

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 9, 2025

Hi @Monish Kandriga

Welcome to the community.

Would it be possible for you to confirm if you're using an API token created from your Atlassian account?

Regards,
Mark C

Monish Kandriga
November 10, 2025

Thank you @Mark C .

Yes, I tried using the API token created for

1. the application service account and

2. my account as well.

Curl is working in both cases, but when I call using httpclient from application, we are getting a 404 error in application logs.

 

Thanks,
Monish

Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 18, 2025

Hi @Monish Kandriga

Thanks for that.

Could you try basic authorization instead of email + api token?

You can check this link for the format, you'll also need to encode your credentials and pass it as a basic auth.

Regards,
Mark C

Suggest an answer

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

Atlassian Community Events