Skip to content

Releases: dropbox/dropbox-sdk-js

Remove references to node-fetch

24 Feb 18:22

Choose a tag to compare

Doc updates to remove node-fetch; removes confusion due to import being different from isomorphic-fetch.

3.0.4

30 Jan 19:42

Choose a tag to compare

Add polyfills for object.assign and array.includes, for IE11.

Modify examples to work in IE11.

v3.0.3

25 Jan 18:35

Choose a tag to compare

Allows calling getAuthenticationUrl() without a redirect uri in code flow.

v3.0.1

23 Jan 18:22

Choose a tag to compare

Avoids setting content-type header when there is no request body.

v3.0.0

23 Jan 09:26

Choose a tag to compare

This release will be a major version bump. Major features in this release are:

  1. Add fetch for requests and remove superagent. Special thanks to James Sidhu!
  2. Change how Dropbox and DropboxTeam are exposed, for consistency.

These are backward incompatible. Going forward, imports change, and developers need to bring their own fetch library.

//Node.js
var Dropbox = require('dropbox').Dropbox;
or 
var DropboxTeam = require('dropbox').DropboxTeam;
require(‘isomorphic-fetch’); // or require(‘node-fetch’) if only running node
const dbx = new Dropbox({ accessToken: 'YOUR_ACCESS_TOKEN_HERE'});

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.

<script src="https://unpkg.com/dropbox/dist/Dropbox-sdk.min.js"></script>
<script src="https://unpkg.com/dropbox/dist/DropboxTeam-sdk.min.js"></script>
<!-- Optional. -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/fetch/2.0.3/fetch.js"></script>
var dbx = new Dropbox.Dropbox({ accessToken: getAccessTokenFromUrl() });

Other new features include:

  1. Add support for select-admin header.
  2. Support app auth method for rpc requests which will enable authTokenFromOauth1
    var Dropbox = require('dropbox').Dropbox;
    var dbx = new Dropbox({ clientId: "...", clientSecret: "..." });
    dbx.authTokenFromOauth1({"oauth1_token": "...", "oauth1_token_secret": "..."}).
        then(function(response) {
            console.log(response.oauth2_token);
        })
        .catch(function(error){
            console.log(error);
        });
  1. Add a getAccessTokenFromCode method. With this, the code authorization flow is now fully supported. There is an example at code_flow_example.js. Thanks to b-dur!
  2. Bug Fixes:
    a. #169
    b. #158
    c. #138
    d. #114
  3. Stone and spec updates
  - team_common namespace:
    - Added new MemberSpaceLimitType union
  - team  namespace:
    - add additional error types to MembersRemoveError union
    - updated docstring
  - users namespace:
    - additional member space limit fields in TeamSpaceAllocation struct
  - team_log namespace:
    - lots of updates to struct names and descriptions (note these routes and structs are still in preview and subject to further changes)

v2.5.13

21 Dec 20:03

Choose a tag to compare

Spec changes

  • files
    • Add download_zip endpoint
    • Add properties_error to UploadError
  • team_log
    • Add more event types

v2.5.12

11 Oct 22:36

Choose a tag to compare

Spec Changes:

Move shared_link to end of parameter list for ListFolderArg.
Add mode to ListRevisionsArg.

Generate SDK from Updated Specs

05 Oct 05:16

Choose a tag to compare

Namespace common:
- new LanguageCode alias

Namespace file_properties:
- Updated docstrings

Namespace file_requests:
- Updated docstrings

Namespace files:
- New aliases and structs relating to shared links

Namespace sharing:
- New UserFileMembershipInfo struct

Namespace team_folders:
- updated doc strings
- additional async example

namespace team_log:
- new TeamEventList alias
- new autogenerated datatypes

namespace team_policies:
- new TwoStepVerificationPolicy

Upgrade mime version

28 Sep 15:06

Choose a tag to compare

Following https://nodesecurity.io/advisories/535, require mime 2.0.3 or greater.

Generate SDK from Updated Specs

19 Sep 05:25

Choose a tag to compare

General:
Updated docstrings in multiple namespaces
Updated general route configuration to support select_admin_mode

file_properties namespace:
New routes and structs for the file properties and templates API functionality

file_requests namespace:
New routes and structs for the file_requests API functionality

files:
deprecate preview routes for files_properties

files_properties:
removed in favor of file_properties

properties:
removed in favor of file_properties

team_property_templates:
removed in favor of file_properties

team:
deprecate beta properites routes

team_members:
Update NamePart? to be OptionalNamePart?

team_policies:
Add new team policies for SSO Paper, RolloutMethod and PasswordStrength