cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We want to make our Community work for you and we need your help. Take our short survey!
Close

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: File Requests

Highlighted

File Requests

Helpful | Level 5

We'd like to create a file request that we use for multiple projects from multiple clients. Each time someone uploads files, we'd like Dropbox to create a folder that's titled with the customers email address, and then add any files they upload to it. As it is now, files show up, but they aren't labled or organized and it's hard to tell which files are from which customer. It wouldn't be practicle for us to create a new file request for each customer, unless there was a way to do that with the API.

13 Replies 13
Highlighted

Re: File Requests

Dropboxer
Dropboxer
Unfortunately, the Dropbox API doesn't currently offer a way to programmatically create file requests, but I'll pass this along as a feature request.
Highlighted

Re: File Requests

Dropboxer
Dropboxer
The Dropbox API now offers the ability to get, list, create, and update file requests:

https://www.dropbox.com/developers/documentation/http/documentation#file_requests

If you're using an official SDK, there will also be corresponding methods for these endpoints.
Highlighted

Re: File Requests

Helpful | Level 5

THAT IS AMAZING!!!! Woo. I'm super excited about this.

 

So question with this- with our scripts, we'd need to hit the API with a single URL with a query string instead of headers. (We're using AppleScript, and you can't add a header stuff o the curl script.)  

 

Is there a way to take this:

 

curl -X POST https://api.dropboxapi.com/2/file_requests/create \
--header "Authorization: Bearer " \
--header "Content-Type: application/json" \
--data "{\"title\": \"Homework submission\",\"destination\": \"/File Requests/Homework\",\"deadline\": {\"deadline\": \"2020-10-12T17:00:00Z\",\"allow_late_uploads\": \"seven_days\"},\"open\": true}"

 

and make it look something like this:

 

curl -X POST https://api.dropboxapi.com/2/file_requests/create/?authirization=abcdefg&Content-Type=application/json&data=audio&destination=/uploader/Customer_email@website.com&deadline=ten_days&open=true
Highlighted

Re: File Requests

Dropboxer
Dropboxer

@ChrisGrahamMast Apologies, it appeared you had duplicate replies, and I tried to remove one, but it seems I somehow managed to remove them both.

 

Anyway, to answer your question:

 

"""

THAT IS AMAZING!!!! Woo. I'm super excited about this.

 

So question with this- with our scripts, we'd need to hit the API with a single URL with a query string instead of headers. (We're using AppleScript, and you can't add a header stuff o the curl script.)

 

Is there a way to take this:

 

curl -X POST https://api.dropboxapi.com/2/file_requests/create \
--header "Authorization: Bearer " \
--header "Content-Type: application/json" \
--data "{\"title\": \"Homework submission\",\"destination\": \"/File Requests/Homework\",\"deadline\": {\"deadline\": \"2020-10-12T17:00:00Z\",\"allow_late_uploads\": \"seven_days\"},\"open\": true}"

 

and make it look something like this:

 

curl -X POST https://api.dropboxapi.com/2/file_requests/create/?authirization=abcdefg&Content-Type=application/json&data=audio&destination=/uploader/Customer_email@website.com&deadline=ten_days&open=true

"""

 

No, unfortunately that's not possible. These are RPC style endpoints, which only accept headers and parameters in the request body. I'll pass this along as a feature request, but I can't make any promises. Apologies I don't have better news!

Highlighted

Re: File Requests

Helpful | Level 5

Right on! No worries! I'm trying to set this up through Zapier's Webhooks "Post" feature, but I can't seem to get it to work there. I've been able to get it working through Terminal on OSX though, but I need to get it to opperate on a server, so that when people fill out a Gravity Form with their email address, that it creates the new file request folder that's called their email address, and then forwards them to that folder to upload files.

 

Screen Shot 2017-10-17 at 5.18.36 PM.png

Highlighted

Re: File Requests

Helpful | Level 5

Above is what I'm seeing in Zapier's POST tool, but I can't get Dropbox's API to respond.

Highlighted

Re: File Requests

Helpful | Level 5
Another alternative might be if Dropbox updates Zapier to include a “create file request” zap.
Highlighted

Re: File Requests

Dropboxer
Dropboxer
Unfortunately, I'm afraid I can't offer help with Zapier, as that's made by a third party. I don't know whether or not it's possible to correctly format the HTTPS request for the Dropbox API call using that Zapier client. (One thing I do see though is that you have "https://api.dropboxapi.com/2/file_requests/create/" instead of "https://api.dropboxapi.com/2/file_requests/create". I.e., you shouldn't have that extra "/" at the end.)

Apologies I can't be of more help with that!
Highlighted

Re: File Requests

Helpful | Level 5

No worries Greg! Thanks for the tip! Do you know if there's any plan to allow file requests to be embedded? That would be utterly amazing.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Need more support?