Your workflow is unique 👨‍💻 -  tell us how you use Dropbox here.

Forum Discussion

Arpit A.'s avatar
Arpit A.
New member | Level 1
10 years ago

Public link for files in dropbox

How do I get the public link of each file in dropbox? Is there a formula to create a public link for the files?

5 Replies

  • Arpit A.'s avatar
    Arpit A.
    New member | Level 1
    10 years ago

    Some background -

    I'm a developer and I want the direct download link of the file on dropbox. The Core API had a /media endpoint however, I'm using iOS Core APIs. Any idea how I should proceed?

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

    To clarify a bit, "public links" refers to an older method of sharing that only applies to items in the Public folder:

    https://www.dropbox.com/help/16

    "Shared links" refers to a new method of sharing that can be applied to any item, regardless of location in the Dropbox account:

    https://www.dropbox.com/help/167

    On the API side of things, if you want to just access file content directly in your app, you should use /files (GET), which corresponds to the loadFile method in the iOS Core SDK.

    If that doesn't work for you though, you can use /media, which returns a temporary direct link to the file content. This corresponds to the loadStreamableURLForFile method in the iOS Core SDK.

    Finally, if you want a shareable link, which doesn't expire (but can be revoked by the user), you can use /shares, which is accessible via the loadSharableLinkForFile method in the iOS Core SDK. Also, shareable links can be modified for different behaviors as noted here:

    https://www.dropbox.com/help/201

    The API doesn't offer a way to request Public links though, but in most cases one of the above methods should be suitable. (Not all accounts have Public folders anyway.)

  • Arpit A.'s avatar
    Arpit A.
    New member | Level 1
    10 years ago

    Oh. Thanks a lot Greg. I did see loadStreamableURLForFile, however I imagined that it was for streaming video or other media content, and definitely not for images. Thanks for the help! :)

    Going further, is there a plan for releasing the documentation of iOS Core APIs other than the tutorial? https://www.dropbox.com/developers/core/start/ios

    I know it might not be very much required, but still helps a little. Thanks!

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

    I don't know if there are plans for full documentation for the iOS Core SDK (as opposed to just what's in the header file now) but I'll send this along as a request.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from 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!