MCPcopy Index your code
hub / github.com/dropbox/dropbox-sdk-js

github.com/dropbox/dropbox-sdk-js @v10.35.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v10.35.0 ↗ · + Follow
4,783 symbols 4,939 edges 41 files 19 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Logo

node-current npm codecov

The offical Dropbox SDK for Javascript.

Documentation can be found on GitHub Pages

Installation

Create an app via the Developer Console

Install via npm

$ npm install --save dropbox

Install from source:

$ git clone https://github.com/dropbox/dropbox-sdk-js.git
$ cd dropbox-sdk-js
$ npm install

If you are using the repository from the browser, you can use any CDNs that hosts the Dropbox package by including a script tag with the link to the package. However, we highly recommend you do not directly import the latest version and instead choose a specific version. When we update and release a breaking change, this could break production code which we hope to avoid. Note, we follow semver naming conventions which means that any major version update could contain a breaking change.

After installation, follow one of our Examples or read the Documentation.

You can also view our OAuth guide.

Examples

We provide Examples to help get you started with a lot of the basic functionality in the SDK. We provide most examples in both Javascript and Typescript with some having a Node equivalent.

  • OAuth

    • Auth - [ JS ] - A simple auth example to get an access token and list the files in the root of your Dropbox account.
    • Simple Backend [ JS ] - A simple example of a node backend doing a multi-step auth flow for Short Lived Tokens.
    • PKCE Backend [ JS ] - A simple example of a node backend doing a multi-step auth flow using PKCE and Short Lived Tokens.
    • PKCE Browser [ JS ] - A simple example of a frontend doing a multi-step auth flow using PKCE and Short Lived Tokens.
  • Other Examples

    • Basic - [ TS, JS ] - A simple example that takes in a token and fetches files from your Dropbox account.
    • Download - [ TS, JS ] - An example showing how to download a shared file.
    • Team As User - [ TS, JS ] - An example showing how to act as a user.
    • Team - [ TS, JS ] - An example showing how to use the team functionality and list team devices.
    • Upload [ TS, JS ] - An example showing how to upload a file to Dropbox.

Getting Help

If you find a bug, please see CONTRIBUTING.md for information on how to report it.

If you need help that is not specific to this SDK, please reach out to Dropbox Support.

License

This SDK is distributed under the MIT license, please see LICENSE for more information.

Extension points exported contracts — how you extend this code

Error (Interface)
* An Error object returned from a route.
types/dropbox_types.d.ts
DropboxAuthOptions (Interface)
(no doc)
types/index.d.ts
UserMessage (Interface)
* User-friendly error message.
types/dropbox_types.d.ts
DropboxOptions (Interface)
(no doc)
types/index.d.ts
PhotoSourceArgBase64Data (Interface)
(no doc)
types/dropbox_types.d.ts
PhotoSourceArgOther (Interface)
(no doc)
types/dropbox_types.d.ts
SetProfilePhotoArg (Interface)
(no doc)
types/dropbox_types.d.ts

Core symbols most depended-on inside this repo

request
called by 265
src/dropbox.js
getAuthenticationUrl
called by 14
src/auth.js
getAccessToken
called by 12
src/auth.js
refreshAccessToken
called by 11
src/auth.js
getClientId
called by 9
src/auth.js
getAccessTokenExpiresAt
called by 9
src/auth.js
getRefreshToken
called by 8
src/auth.js
checkAndRefreshAccessToken
called by 8
src/auth.js

Shape

Interface 4,724
Method 28
Class 16
Function 15

Languages

TypeScript100%
Python1%

Modules by API surface

types/dropbox_types.d.ts4,722 symbols
src/auth.js21 symbols
types/index.d.ts10 symbols
src/utils.js10 symbols
src/dropbox.js9 symbols
src/response.js6 symbols
src/error.js3 symbols
generator/generate_routes.py1 symbols
examples/javascript/utils.js1 symbols

For agents

$ claude mcp add dropbox-sdk-js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page