Getting started

Once the Dropbox SDK for JavaScript is installed. You'll be able to make requests using the Dropbox or DropboxTeam class. The way you access these classes depends on how you've installed the package.

When installed with CommonJS (Node.js)

Both classes are available as separated requires as most users require only the Dropbox class.

var Dropbox = require('dropbox').Dropbox;
var DropboxTeam = require('dropbox').DropboxTeam;

When using jspm or an ECMAScript transpiler (Babel)

An ES6 Module exports the Classes separately from the package in a number of ways to support variety of differences between package managers and precompilers.

import { Dropbox } from 'dropbox';
import Dropbox from 'dropbox/dropbox';
import DropboxTeam from 'dropbox';
import { DropboxTeam } from 'dropbox';

Using the UMD module via the browser

The Dropbox and DropboxTeam classes are available on the global window object as window.Dropbox.Dropbox and window.Dropbox.DropboxTeam.

<script src=""></script>
<script src=""></script>

On the web and on most modern browsers, fetch should be available (List of supported browsers). Otherwise, use the polyfill below (for example), or use an npm package such as whatwg-fetch.

<!-- Optional. -->
<script src=""></script>
<script src=""></script>


Next, you'll need to learn how to authorize your requests with Authentication.