JavaScript
Overview
Install
Tutorial
Documentation
Dropbox for JavaScript
Here’s our JavaScript SDK for API v2, which helps you easily integrate Dropbox into your JavaScript app.
Code
Dropbox for JavaScript - Dropbox JavaScript SDK is open source on GitHub.
Install Dropbox for JavaScript
To get started with Dropbox for JavaScript, we recommend you add the SDK to your project using npm.
Install the JavaScript SDK
Download and install the SDK.
Then use with a module bundler
Dropbox for JavaScript tutorial
A good way to start using the JavaScript SDK is to follow this quick tutorial. Just make sure you have the the JavaScript SDK installed first!
Register a Dropbox API app
To use the Dropbox API, you’ll need to register a new app in the Developer Console. Choose Scoped access, then choose the type of access your app needs (App folder or Full Dropbox). You’ll need to use the app key created with this app to access API v2.
Link an account
In order to make calls to the API, you’ll need an instance of the Dropbox object. To instantiate, pass in the access token for the account you want to link. (Tip: You can generate an access token for your own account through the Developer Console. Open your app, go to the Settings tab, and click Generate access token.)
If your app uses team scopes and you are not a team admin, Generate access token is disabled.
Test it out to make sure you’ve linked the right account:
Try some API requests
You can use the Dropbox object you instantiated above to make API calls. Try out some of the files requests.
List all of the contents in the user’s root directory:
You can read more in the documentation. Also checkout the examples folder on GitHub.
Dropbox for JavaScript documentation
Here’s the full documentation for the JavaScript SDK.