One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
sunshine_sai
4 years agoHelpful | Level 5
How to get file download url using api in php
Hi,
I want to get a dropbox storage file download link. I want a downloadable file URL programmatically or using PHP function that I can use when I need to download a file.
I want any code, function to get the URL of the file download
I want a link to download the file, later. using PHP get download file URL with API
- Greg-DB
Dropbox Staff
The standard way to download a file via the Dropbox API is the /2/files/download endpoint. That returns the file data directly in the response body.
If you do need a URL that you can use to download the file, you can call /2/files/get_temporary_link. That will return a link that you can use to access the file data later via a GET request. Note that these links are only valid for four hours though.
- sunshine_saiHelpful | Level 5
Thanks for your reply
but I want file download link which any time any one can download file directly from my dropbox storage from my site using this URL.
How to get that link using API or PHP
- Greg-DB
Dropbox Staff
If you need a non-temporary link, you can instead use /2/sharing/create_shared_link_with_settings to get a shared link.
You can also modify those shared links for different behaviors as documented here.
About Discuss Dropbox Developer & API
Make connections with other developers804 PostsLatest Activity: 23 hours ago
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!