Skip to main content
Question

Possible to upload files to a Box 'file request' URL via linux CLI?

  • May 22, 2025
  • 8 replies
  • 10 views

Forum|alt.badge.img

Hi all, curious if anyone knows of a way to upload files to a Box "File Request" URL via command line, perhaps with curl?  For clarification, I'm not trying to do an API-based upload, I'm wanting to send a file directly from a linux box to the Box folder of a third party who has gone in, clicked "File Request", and then received a URL from Box that they send to anyone who needs to send an inbound-only file to that person.  Would prefer to not bring the file down to my desktop just to then send it back via a graphical web browser.

 

Thanks

8 replies

Forum|alt.badge.img

Hi  ,

 

If I understand your request (and please correct me if I'm wrong) you'll looking for a public URL structure for a file stored in Box that can be processed as a download URL for another service?

 

I know you said that you weren't looking for an API solution, but there is a lightweight way of doing this without a deep app integration. I've outlined the process for creating a public URL in this previous post, which I think may help get you there.

 

Thanks,

Jon


Forum|alt.badge.img

No, I'll give an example.  If I want you to send me a file, without adding you as a collaborator to a folder, I log into Box via web browser, go to the folder where I want your file to end up, click "File Request".  Box will spit out a URL that I can then send you, you plug it into your browser, and you get a website that says hey drop your files here.  If you drop a file, it ends up in my folder, you have no additional access.

 

What I'm trying to accomplish is to take that same file request URL that works fine in a regular web browser, and use it via curl or similar command line tool to upload a file via linux command line.  We have customers who would like to send us data directly from a linux system, and they don't want to take the additional step of download file to a desktop computer, then upload back to Box via the File Request URL we send them.


Forum|alt.badge.img

 Unfortunately we don't have an API endpoint to interact with the file request feature at this time. I highly recommend submitting this feedback to pulse.box.com if you'd like to see this added! 

 

Best, 

Kourtney

Box Technical Support Engineer 


Forum|alt.badge.img

Oh, not even looking for something that formal.  I'm just wondering if there's any type of command line web request executable, such as curl or wget, that is capable of properly interacting with the Box "File Request" feature's javascript to allow for the uploading of a file to the file request URL without the need to use a 'real' browser like Firefox, etc.  The issue I ran into is the URL the 'file request' produces is not just able to receive a POST request from curl and receive the file using the typical -F multipart POST request that curl would normally use to send files to a remote URL.


Forum|alt.badge.img

Hello, I need this functionality too...

 

Is there a way to upload a file using bash scripts (cURL) to a Box File Request page?


Forum|alt.badge.img

I don't know about bash or linux, but here's how I do it on Powershell on Windows: https://stackoverflow.com/a/64008466/1411058 



Forum|alt.badge.img

It seems like some people have had success using curl to upload files to box: 

https://support.box.com/hc/en-us/community/posts/360049140134/comments/360012391574

But I can't get this to work using a file request URL. @colohost, if you ever solved this problem please let us know!


Forum|alt.badge.img

Unfortunately did not.  I suspect Box cares about providing such a solution about as much as releasing a usable version of Box Drive for the M1 chip.