Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hello Dropbox team,
I have a usecase, where in my webApp (Node js - Angular), user will come and select "dropbox" icon, which will open Dropbox Authentication window, for the user to authenticate.
Once he is authenticated successfully, then the file selected by user from dropbox, should get downloaded to my server (webapp).
I saw documentation on dropbox at this page: https://www.dropbox.com/developers/documentation
But there are 2 ways to achieve the download, -
I found there is an api to download the file: https://content.dropboxapi.com/2/files/download
But I have couple of questions:
Please provide some example to handle this usecase.
As you found, Dropbox does offer an API you can use for listing, uploading, and downloading files, among other operations. You can find everything you need to get started with the Dropbox API, including documentation, tutorials, and SDKs here.
To clarify though, the API Explorer is just a tool meant to make it easy to experiment with the Dropbox API. The Dropbox API itself consists of the HTTPS endpoints, which are documented here. You can use the API Explorer to test out the Dropbox API, but it's not meant as a way to integrate with the API in your actual app.
The Dropbox API can be used by any platform that can make HTTPS calls. You can call the HTTPS endpoints directly, but we do recommend using one of the official SDKs, if possible, as they will do much of the work for you.
If you're just getting started with the Dropbox API, you may want to check out the Getting Started guide first to get a basic understanding of how to use it.
Anyway, as you mentioned, to download a file via the API, you would use the /2/files/download endpoint, or the corresponding native method in an SDK, if you're using one. That takes a "path" parameter which is how the app specifies which file is wants to download. This may determined by the app's logic, or selected by the user. I recommend reading the File Access Guide for information on navigating and interacting with paths and files on the Dropbox API.
Basically, in my usecase, user will login to dropbox and select file. Once he selects the file from dropbox, file should get downloaded automatically to our webapp(server).
I was reading dropbox documentation, and found that, there is pre-built component called "Chooser".
I was thinking, probably, this would help in my usecase.
Thanks
Amit
Yes, if you just need a way to get a file from the user's Dropbox account into your web app by having the user select it, the Dropbox Chooser may be a good option. You can find the information on using the Chooser here.
I saw that dropbox chooser is not available for angular, what to do then ? @Amit how did you solve this ?
@qa7641 Dropbox still doesn't offer support for using the Dropbox Chooser in Angular, but I'll pass this along as a feature request. I'm not aware of any plans for that currently though.
Hi there!
If you need more help you can view your support options (expected response time for a 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!