Take Your Search Game to the Next Level with Dropbox Dash  🚀✨ Curious how it works? Ask us here! 

Forum Discussion

Gavin O.2's avatar
Gavin O.2
New member | Level 1
10 years ago

Link to files/folder - not sharing

Hello again team,

I'm attempting to write an app that will send people links to items within their Dropbox files and folders.

This app makes use of the delta/metadata endpoints to discover files and folders.

I'm going through your documentation and I'm struggling to find any documented way of constructing URLs to deep link into a Dropbox account.

I see I can create shared links for the purpose of sharing but I don't want to create new links with their own security implications - I just want to provide app users with links to their own Dropbox content in the Dropbox web portal - and secured by the web portal.

Looking closer into the portal I see that I can construct URLs to deep link into a folder that look like this:

https://www.dropbox.com/home/<path>

Is this a supported mechanism for apps to do this?

  • Are there any gotchas / dropbox features that would make this a bad idea?
  • Is there a preferred way of doing this?
  • How about linking to files?

I did also notice that your windows desktop client makes use of a dropbox.com API to provide the link via a redirect:

https://www.dropbox.com/c/browse/<path>?<query>
  • Is this a supported API?
  • Can I construct those URLs from the information provided in the /metadata API?

Any guidance on how I might go about doing this would be greatly appreciated.

15 Replies

  • Unfortunately, we don't have a way to hotlink to a file on dropbox.com, but we'll consider this as a feature request.

    Things to watch out for if you try to just do "/home/..." is that Dropbox for Business users may have different paths, depending on whether they've linked a work and personal account (and then the path depends on which account is being used).

  • NCP D.'s avatar
    NCP D.
    New member | Level 1

    Steve, thanks for your response.

    The scenario you describe between linked work and personal accounts is one I hadn't considered, I will look further into this.

    Is there a way to detect the correct path today?

    Additionally, I would ask if this is something I should do?

    eg: if this is not currently a supported use-case for dropbox.com then I can't really build an app that relies on this, right?

    Thanks again

  • I can't think of a reliable way to figure out the path today. Agreed that it's probably not a great idea to build an app that relies on this (since you're unlikely to be able to get it 100% correct today, and we may end up breaking things later).

  • NCP D.'s avatar
    NCP D.
    New member | Level 1

    Thanks Steve, I appreciate your openness.

    Please do consider deep linking into both files and folders on dropbox.com a feature request :-)

  • L. Kelvin's avatar
    L. Kelvin
    New member | Level 1

    Yes, accessing file/folder with direct link is need. As my web hosting has limited storage for me and now looking for other storage solution, if it works, I think Dropbox will be alternative web storage with a web hosting.

    Best regards,

    Kelvin.

  • Dag B.1's avatar
    Dag B.1
    New member | Level 2

    I would like to second this request for linking. This is something our app would benefit from!

    Best regards,

    Dag.

  • Craig L.15's avatar
    Craig L.15
    New member | Level 2

    I am also looking for a method to deep link to a file.  Just not on the website - but on the desktop.

     

    Scenario.

    We are 3 users, and we use Wunderlist (and Gmail, and other apps)

    I would love to attach files to an Task, Email etc that will open up the file or location in the Desktop Application.

    The problem is our shared folders all live in different local path locations.

    eg. 

    User 1, has a Mac so the path is \usr\dropbox\sharedfoldersX\sharedfolder1\subfolder\file.txt

    User 2, has a PC and the path is C:\Users\dropbox\sharedfoldersY\sharedfolder1\subfolder\file.txt

    User 3, has a PC and the path is D:\dropbox\sharedfolder1\subfolder\file.txt

     

    So there is no clean way to give a Local File Path easily.

    We currently share it like this 

    \sharedfolder1\subfolder\file.txt

    But that is a pain to get, especially on a Mac.

    If the App could work this out, like this.

    file.txt has ID 44444

    User 1 clicks dropbox.com\?openlocation=44444

    It Either Opens the file on the local system (as it knows the location as per above)

    OR dropbox.com\?openlocation=44444&dir=yes

    Opens location in Finder/ File Explorer

    \usr\dropbox\sharedfoldersX\sharedfolder1\subfolder\

     

    So dropbox.com\openlocation= is a Webhook to open the Desktop Application, if it is not there, it opens the Web location.

    That would be super helpful and maintain file integrity across applications like Task lists and Email :)

     

    Kinda like a "Share with Colleague" button in the Context menu.

    • Lucben's avatar
      Lucben
      Helpful | Level 6

      Any progress on this? Badly needed. Someone posted the recommendation to modify the link url by using "dl." instead of "www."  but I am not sure whether that is a reliable long term URL or things might break at some point?

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff
        No update on deep links like this.

        (The URL transformation you're referring to only applies to shared links, as a way to control the behavior of the shared link itself. The officially documented way to do that is found here: https://www.dropbox.com/help/201 )

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,000 PostsLatest Activity: 6 hours ago
382 Following

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!