cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right here.

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: 

Download a file with the API

Download a file with the API

aadi
Explorer | Level 3
Go to solution

Hi
I'm using https://dropbox.github.io/dropbox-api-v2-explorer/#files_download for download file.

 

I want to provide directly a link to the end user or download start just load the code.

I'm using the dropbox API from a server side. If I use this method I will need two steps to download a file (1. from Dropbox to my WebServer; 2. From my webserver to the endUser machine). I want to avoid this 2 steps, and having a direct link or direct download is a good option for it.

 

Thanks.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution
To let the user download the file directly, you can instead use /2/files/get_temporary_link to get a link to the file, and pass the link to the client:

https://www.dropbox.com/developers/documentation/http/documentation#files-get_temporary_link

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff
Go to solution
To let the user download the file directly, you can instead use /2/files/get_temporary_link to get a link to the file, and pass the link to the client:

https://www.dropbox.com/developers/documentation/http/documentation#files-get_temporary_link

aadi
Explorer | Level 3
Go to solution
Hi Greg,
Thanks for reply.
What’s about expiration of this temporary link?
May i can expire this link after user click/download file? Or is there any way for direct download file (no need to click any button) just load page and file automatically start to download..

Greg-DB
Dropbox Staff
Go to solution

These links expire after four hours. It's not possible to manually expire them earlier than that. 

 

If you control the web server and the user is using a typical web browser/client, you can probably return a redirect to the temporary link itself. Exactly how you do so would depend on your web framework though.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    aadi Explorer | Level 3
What do Dropbox user levels mean?