How to download a folder (preferably as .zip) with cURL API?

Highlighted
New Contributor

How to download a folder (preferably as .zip) with cURL API?

I tried this:

 

 curl -L https://api.box.com/2.0/folder/FOLDER_ID/items -H "Authorization: Bearer AUTH_KEY"

Error:

 

{"type":"error","status":401,"code":"unauthorized","help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Unauthorized - Cannot authorize with this service","request_id":"l7g1fffudda0ncc
3 REPLIES 3
Highlighted
Box Employee

Re: How to download a folder (preferably as .zip) with cURL API?

Hello, 

 

Thanks so much for using the Platform and Development Forum! 

 

Can you please provide the full body response? I am specifically looking for the complete "request id", so I can take a look at our backend logs. 

 

Best, 

Kourtney 

Highlighted
First-time Contributor

Re: How to download a folder (preferably as .zip) with cURL API?

Is there a update on this question?  I have seen there is a zip download option on the API page. I am not quite sure how to use it. Is there a example using curl?

Thank you!

Highlighted
Box Employee

Re: How to download a folder (preferably as .zip) with cURL API?

Hi @dillon2, at the time of writing we did not have an API for this yet, but now we do! 

 

https://developer.box.com/reference/post-zip-downloads/

 

https://medium.com/box-developer-blog/new-zip-download-apis-a625b5e514b8


---
Developer Advocate @ Box