Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

jrcampins's avatar
jrcampins
Explorer | Level 4
9 years ago
Solved

command-line download app

I am trying to build an App to let other people (even non-Dropbox users) easily download files from a specific folder in my Dropbox. The App only needs to have read-only access to such folder.

Based on the examples, I built a very simple command-line download app. The app works just fine but I don't want to distribute it as it is, as my access token is hard-coded in it, and although its permission type is "App folder" and therefore its access should be limited to that folder it would be read-write access.

Could anybody please help me find a way build this App without sharing my access token and/or my secret key?

  • The API was designed with the intention that each user would link their own Dropbox account, in order to interact with their own files. However, it is technically possible to connect to just one account, as you've done, but we don't recommend doing so, for various technical and security reasons, like you mentioned.

    Anyway, there isn't a way to configure a read-only permission, but I'll pass this along as a feature request.

    Alternatively, you could consider using shared links to link to content in your Dropbox:

    https://www.dropbox.com/help/files-folders/view-only-access

    You can modify these links for direct access, e.g., to programmatically download from them:

    https://www.dropbox.com/help/desktop-web/force-download

2 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago
    The API was designed with the intention that each user would link their own Dropbox account, in order to interact with their own files. However, it is technically possible to connect to just one account, as you've done, but we don't recommend doing so, for various technical and security reasons, like you mentioned.

    Anyway, there isn't a way to configure a read-only permission, but I'll pass this along as a feature request.

    Alternatively, you could consider using shared links to link to content in your Dropbox:

    https://www.dropbox.com/help/files-folders/view-only-access

    You can modify these links for direct access, e.g., to programmatically download from them:

    https://www.dropbox.com/help/desktop-web/force-download
  • jrcampins's avatar
    jrcampins
    Explorer | Level 4
    9 years ago

    Thanks a lot! Modifying the links for direct access solves my problem. Files can be downloaded very easily using FileUtils.copyURLToFile (no need for Dropbox's API).

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!