npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dropbox

v10.46.0

Published

The Dropbox JavaScript SDK is a lightweight, promise based interface to the Dropbox v2 API that works in both nodejs and browser environments.

Readme

Dropbox JavaScript SDK

Node.js 22 and 24 npm version codecov

The official Dropbox API v2 SDK for JavaScript.

Runtime support

The SDK supports Node.js 22 and newer, modern web browsers, and Web Workers. Continuous integration currently tests Node.js 22 and 24, and Node.js uses its built-in fetch implementation. Browser and Worker environments must provide Promise, fetch, and TextEncoder; PKCE authentication also requires the Web Crypto API. Add polyfills when targeting older environments that do not provide the required APIs.

Installation

Create an app in the Developer Console, then install the SDK from npm. Published npm packages already contain CommonJS, ES module, browser, and TypeScript builds; applications do not need to build the SDK from source. Published versions and release history are available on the npm versions page.

npm install dropbox

Node.js

const { Dropbox } = require('dropbox');

const dbx = new Dropbox({
  accessToken: process.env.DROPBOX_ACCESS_TOKEN,
});

dbx.filesListFolder({ path: '' })
  .then(({ result }) => console.log(result.entries))
  .catch(console.error);

Browser application with a bundler

Webpack, Rollup, Vite, and similar tools can use the package's ES module build.

import { Dropbox } from 'dropbox';

const dbx = new Dropbox({ accessToken: 'YOUR_ACCESS_TOKEN' });

Browser application from a CDN

The browser bundle exposes the SDK through the global Dropbox object. Pin an exact SDK version so a future breaking release cannot change your application unexpectedly.

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/Dropbox-sdk.min.js"></script>
<script>
  const dbx = new Dropbox.Dropbox({ accessToken: 'YOUR_ACCESS_TOKEN' });
</script>

Do not hard-code production access tokens in public source code.

Web Worker

The same browser bundle can be loaded in a Worker:

importScripts('https://cdn.jsdelivr.net/npm/[email protected]/dist/Dropbox-sdk.min.js');

const dbx = new Dropbox.Dropbox({ accessToken: 'YOUR_ACCESS_TOKEN' });

Install from source

Building is required only when developing the SDK itself or running examples directly from this repository.

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

Browser authentication and PKCE

Client-side applications cannot keep an app secret confidential. Never embed a Dropbox app secret in browser or Worker code. Use the OAuth authorization-code flow with PKCE and your app key instead. See the browser PKCE example and the Dropbox OAuth guide. PKCE requires a secure context and the Web Crypto API.

Server applications can keep an app secret confidential and may use the regular authorization-code flow.

API reference

The complete generated API reference is published on GitHub Pages.

Examples

The examples demonstrate common SDK operations. Most are available in both JavaScript and TypeScript, with additional Node.js OAuth examples.

  • 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.
    • Backend Download - [ JS ] - An example showing resumable backend downloads to local storage.
    • 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.