Skip to main content
Question

Help! How do you use cURL to download a file with a password?

  • May 21, 2025
  • 8 replies
  • 102 views
  • Translate All

Forum|alt.badge.img

I have a file that I have shared as "People with the link" and have set a password for the share. I am trying to figure out how to use the cURL command to download that file. 

 

I can use cURL to download fine as long as I dont have a password on it. 

 

Thanks for the help. 

8 replies

Forum|alt.badge.img

If cURL is not the best method, I am open to other options.

 

I just need a way to use Terminal on a Mac to download a file on Box that has a password. 

Translate

Forum|alt.badge.img

Did you find solution for that?

Translate

Forum|alt.badge.img

I have not found a way to make it work, 

Translate

Forum|alt.badge.img

Hi Jason,

 

there is a get shared item call which lets you specify the password:

 

curl https://api.box.com/2.0/shared_items?fields=type,id
-H "Authorization: Bearer ACCESS_TOKEN"
-H "BoxApi: shared_link=SHARED_LINK_URL&shared_link_password=PASSWORD"

You can find the full documentation here:

 

https://developer.box.com/v2.0/reference#get-a-shared-item

 

Let me know if this worked for you.

 

Thanks

 

Johannes

Translate

Forum|alt.badge.img

I get this error message:

 

    `{"type":"error","status":404,"code":"not_found","help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Not Found","request_id":"qdmntzfq332zubej"}`

 

Has anyone ever successfully downloaded a file from box? How did you do it? Thanks!

Translate

Forum|alt.badge.img

Forum|alt.badge.img

How do you get that token without manually firing up a browser and logging into box? I'd like to be able to automate the whole thing.

Translate

Forum|alt.badge.img

You need to create an auth token using the developer panel.

 

https://app.box.com/developers/console

 

You should be able to find that link lower left when you are logged into your box account.

 

I'm just figuring this out myself, and have not yet succeeded at using the API.

Translate