Forum Discussion

Gregory B.3's avatar
Gregory B.3
New member | Level 1
11 years ago
Solved

Providing Users access to MY files via a Dropbox API app.. I don't care about their files

I've got a big Dropbox folder full of PDFs that I'd like to allow users to download from my website. However, everything I've seen in the API seems to work with the user's Dropbox account, allowing the website to pull up files from their accounts, etc. Literally all I want is to show my visitors a list of files and folders from my DB that they can download.

Certainly this is possible with the API, right? It seems as if every call needs a Oauth token, which seems to come from the user browsing, rather then some consistent account. Can anyone provide some very basic direction for this Dropbox API newbie?

  • Greg-DB's avatar
    Greg-DB
    6 years ago

    I just wanted to follow up on this thread to let you know that we've made a preview of a new pre-built component for embedding files and folders available! You can find more information about the Dropbox Embedder in our blog post here:

     

    https://dropbox.tech/developers/new-file-and-folder-embedder-launched-in-preview

     

    There's also a chance to win a $200 Amazon gift card if you fill out a survey about the new Dropbox Embedder. Check out the blog post above for more information.

5 Replies

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

    You're correct that 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. The SDKs don't offer explicit support for it and we don't recommend doing so, for various technical and security reasons. For web apps though, most of these concerns are allayed, since you can protect your access token server-side.

    If you did want to go this route, instead of kicking off the authorization flow, you would manually use an existing access token for your app and account. (Just be careful not to revoke it, e.g. via https://www.dropbox.com/account/security .) That is to say, you just need to process the app authorization flow (or get a generated access token via the App Console) for your own account once and then hard code that access token into your app for use when making the necessary API calls.

    Alternatively, you could just use a shared link to the folder you want to share.

  • Gregory B.3's avatar
    Gregory B.3
    New member | Level 1
    11 years ago

    Thanks Greg K! Awesome help there -- One last question about this: Since this folder contains sub-folders, I'm not really relishing having to code out the API from scratch to allow users to browse through sub-folders (and reload the file list, etc). Are you aware of any pre-built community solutions that handle navigating through a connected Dropbox folder, from a UI/UX perspective?

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

    I'm not aware of anything quite like that off hand, unfortunately.

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

    I just wanted to follow up on this thread to let you know that we've made a preview of a new pre-built component for embedding files and folders available! You can find more information about the Dropbox Embedder in our blog post here:

     

    https://dropbox.tech/developers/new-file-and-folder-embedder-launched-in-preview

     

    There's also a chance to win a $200 Amazon gift card if you fill out a survey about the new Dropbox Embedder. Check out the blog post above for more information.

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!