AngularJS Dropbox Client

bower install angular-dropbox-api



Forked from ngDropbox is a Dropbox Core API Client for AngularJS adapted from dropbox-js. It should be familiar to dropbox-js users as well as idiomatic to AngularJS.


This module is in development. It's pending to implement the rest of the API. If you want to use AngularDropboxAPI but something is missing or doesn't work as expected, please submit an issue. Thanks in advance!


Bower is the quickest way to include AngularDropboxAPI in your project.

$ bower install --save

<script src="bower_components/ngDropbox/dropbox.js"></script>

If you don't use Bower, just download dropbox.js into your scripts directory.

$ curl -O

<script src="your/js/path/dropbox.js"></script>


After you create an app in the Dropbox App Console, add an OAuth Redirect URI pointing to https://<HOST>/components/ngDropbox/callback.html.

In your AngularJS app, load the module. Inform your app of the App key and Redirect URI, then inject the service into your controllers and start making API calls. All methods that communicate with the API return promises.

// load the module
angular.module('myApp', ['dropbox'])

  .config(function (DropboxProvider) {
    DropboxProvider.config(<APP_KEY>, <REDIRECT_URI>);

  // inject the service
  .controller('DropboxCtrl', function ($scope, Dropbox) {

    // assign a promise to scope
    $scope.accountInfo = Dropbox.accountInfo();

    // or use callbacks
    Dropbox.copy('dir/image1.jpg', 'dir/image2.jpg').then(function (res) {
      Dropbox.move('dir/image1.jpg', 'dir/image.jpg').then(function (res) {
        $ = Dropbox.stat('dir');




  • Methods for the rest of the API
  • Support redirect and other authentication methods in addition to browser popup
  • Test in multiple browsers
  • Test error cases


Installing the Karma test runner with npm install karma -g, then run the tests with karma start.