Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A **DEPRECATED** Node.js client library for the official Dropbox API
JavaScript CSS

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


An OAuth-enabled node.js client for working with the Dropbox API.


dropbox-node depends on node-oauth.

To install via npm

npm install dropbox

To install by hand, download the module and create a symlink in ~/.node_libraries

$ ln -s /path/to/dropbox-node/ ~/.node_libraries/dropbox-node


To start, you'll need to grab a consumer key and secret from

OAuth credentials and object construction

First construct an OAuth client and acquire a valid access token and access token secret pair.

var sys = require('sys'),
    DropboxClient = require('dropbox-node').DropboxClient,
    OAuth = require('oauth').OAuth,
    oauth = new OAuth('',
                      consumer_key, consumer_secret,
                      '1.0', null, 'HMAC-SHA1');

Now create a DropboxClient object.

var dropbox = new DropboxClient(oauth, access_token, access_token_secret);

Calling API methods

dropbox-node provides methods covering each of the Dropbox API methods, excluding access token acquisition and account creation.

For example, to fetch and print the display name and email address associated with your account:

dropbox.getAccountInfo(function(err, data) {
  if (err) console.log('Error: ' + sys.inspect(err));
  else {
    console.log(data.display_name + ', ' +;

Here's an example where we upload a file and remotely move it around before deleting it.

// Upload foo.txt to the Dropbox root directory.
dropbox.putFile('foo.txt', '', function(err, data) {
  if (err) console.error(err.stack);
  else {
    // Move it into the Public directory.
    dropbox.move('foo.txt', 'Public/foo.txt', function(err, data) {
      if (err) console.error(err.stack);
      else {
        // Delete the file.
        dropbox.deleteItem('Public/foo.txt', function(err, data) {
          if (err) console.error(err.stack);


dropbox-node depends on jasmine-node for testing. Note that the currently-implemented tests are trivial at best.

Run specs with node specs.js from the root dropbox-node directory.


  • Improve test coverage.
  • Improve documentation.
  • Add ability to interact with application sandboxes.
Something went wrong with that request. Please try again.