Forum Discussion

sunshine_sai's avatar
sunshine_sai
Helpful | Level 5
5 years ago

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

3 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 years ago

    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_sai's avatar
    sunshine_sai
    Helpful | Level 5
    5 years ago

    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 

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API
Make connections with other developers

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

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, Facebook or Instagram.

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!