PHPackages                             rps/dropbox-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. rps/dropbox-sdk

ActiveLibrary[File &amp; Storage](/categories/file-storage)

rps/dropbox-sdk
===============

Dropbox SDK for PHP

v1.1.4(11y ago)086MITPHPPHP &gt;= 5.3

Since Apr 5Pushed 11y ago1 watchersCompare

[ Source](https://github.com/yosokus/dropbox-sdk-php)[ Packagist](https://packagist.org/packages/rps/dropbox-sdk)[ RSS](/packages/rps-dropbox-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (10)Used By (0)

Dropbox SDK for TYPO3 Flow 2.2+
===============================

[](#dropbox-sdk-for-typo3-flow-22)

A PHP library to access [Dropbox's HTTP-based API](http://dropbox.com/developers/core/docs).

License: [MIT](License.txt)

Requirements:

- PHP 5.3+, [with 64-bit integers](http://stackoverflow.com/questions/864058/how-to-have-64-bit-integer-on-php).
- PHP [cURL extension](http://php.net/manual/en/curl.installation.php) with SSL enabled (it's usually built-in).
- Must not be using [`mbstring.func_overload`](http://www.php.net/manual/en/mbstring.overload.php) to overload PHP's standard string functions.

[SDK API docs.](http://dropbox.github.io/dropbox-sdk-php/api-docs/v1.1.x/)

Setup
-----

[](#setup)

If you're using [Composer](http://getcomposer.org/) for your project's dependencies, add the following to your "composer.json":

```
"require": {
  "dropbox/dropbox-sdk": "1.1.*"
}

```

If you're not using Composer, download the code, copy the "lib/" folder into your project somewhere, and include the "lib/Dropbox/autoload.php" in your code. For example, if you copied the "lib/" and named it "dropbox-sdk/", you would do:

```
// Do this only if you're not using a global autoloader (such as Composer's).
require_once "dropbox-sdk/Dropbox/autoload.php";
```

IMPORTANT: Many PHP installations have an insecure SSL implementation. To check if your PHP installation is insecure, run the included "examples/test-ssl.php" script, either on the command line or via your web server.

Get a Dropbox API key
---------------------

[](#get-a-dropbox-api-key)

You need a Dropbox API key to make API requests.

- Go to:
- If you've already registered an app, click on the "Options" link to see the app's API key and secret.
- Otherwise, click "Create an app" to register an app. Choose "Dropbox API app", then "Files and datastores", then "Yes" or "No" [depending on your needs](https://www.dropbox.com/developers/reference#permissions).

Save the API key to a JSON file called, say, "test.app":

```
{
  "key": "Your Dropbox API app key",
  "secret": "Your Dropbox API app secret"
}

```

Using the Dropbox API
---------------------

[](#using-the-dropbox-api)

Before your app can access a Dropbox user's files, the user must authorize your application using OAuth 2. Successfully completing this authorization flow gives you an *access token* for the user's Dropbox account, which grants you the ability to make Dropbox API calls to access their files.

- Authorization example for a simple web app: [Web File Browser example](examples/web-file-browser.php)
- Authorization example for a command-line tool: [Command-Line Authorization example](examples/authorize.php)

Once you have an access token, create a [`Client`](http://dropbox.github.io/dropbox-sdk-php/api-docs/v1.1.x/class-Dropbox.Client.html) and start making API calls.

You only need to perform the authorization process once per user. Once you have an access token for a user, save it somewhere persistent, like in a database. The next time that user visits your app, you can skip the authorization process and go straight to making API calls.

Running the Examples and Tests
------------------------------

[](#running-the-examples-and-tests)

1. Download this repository.
2. Save your Dropbox API key in a file called "test.app". See: [Get a Dropbox API key](#get-a-dropbox-api-key), above.

### authorize.php

[](#authorizephp)

This example runs through the OAuth 2 authorization flow.

```
./examples/authorize.php test.app test.auth

```

This produces a file named "test.auth" that has the access token. This file can passed in to the other examples.

### account-info.php

[](#account-infophp)

A trivial example that calls the /account/info API endpoint.

```
./examples/account-info.php test.auth

```

(You must first generate "test.auth" using the "authorize" example above.)

### web-file-browser.php

[](#web-file-browserphp)

A tiny web app that runs through the OAuth 2 authorization flow and then uses Dropbox API calls to let the user browse their Dropbox files.

**Required**: copy one of the ".app" files you created previously to "examples/web-file-browser.app".

**Using PHP built-in web server (PHP 5.4+).**

1. Go to the Dropbox API [app console](https://www.dropbox.com/developers/apps), go to the API app you configured in "web-file-browser.app", go to the *OAuth redirect URIs* section, and add "".
2. Run "`php web-file-browser.php`".
3. Point your browser at "".

**Using an existing web server setup.**

1. Copy the entire SDK folder to your web server's document path. For example, let's say the script is accessible at "".
2. Go to the Dropbox API [app console](https://www.dropbox.com/developers/apps), go to the API app you configured in "web-file-browser.app", go to the *OAuth redirect URIs* section, and add "".
3. Point your browser at "".

### Running the Tests

[](#running-the-tests)

1. run: `composer install --dev` to download the dependencies. (You'll need [Composer](http://getcomposer.org/download/).)
2. Put an "auth info" file in "test/test.auth". (You can generate "test/test.auth" using the "authorize.php" example script.)

```
./vendor/bin/phpunit test/

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~70 days

Recently: every ~117 days

Total

9

Last Release

4224d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/45b7b957d40ea4f46682d329e5c335286607c9e9825912a49b32923bb90ad6b3?d=identicon)[yosokus](/maintainers/yosokus)

---

Top Contributors

[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (2 commits)")[![cakoose](https://avatars.githubusercontent.com/u/239989?v=4)](https://github.com/cakoose "cakoose (1 commits)")[![dimaryaz](https://avatars.githubusercontent.com/u/4365877?v=4)](https://github.com/dimaryaz "dimaryaz (1 commits)")[![jandeschuttere](https://avatars.githubusercontent.com/u/741097?v=4)](https://github.com/jandeschuttere "jandeschuttere (1 commits)")[![wmh](https://avatars.githubusercontent.com/u/50888?v=4)](https://github.com/wmh "wmh (1 commits)")

---

Tags

dropbox

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/rps-dropbox-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/rps-dropbox-sdk/health.svg)](https://phpackages.com/packages/rps-dropbox-sdk)
```

###  Alternatives

[spatie/flysystem-dropbox

Flysystem Adapter for the Dropbox v2 API

3644.6M68](/packages/spatie-flysystem-dropbox)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[spatie/laravel-tinker-tools

Use short class names in an Artisan tinker session

13850.2k](/packages/spatie-laravel-tinker-tools)[benjamincrozat/laravel-dropbox-driver

Dropbox storage driver for Laravel.

55275.3k2](/packages/benjamincrozat-laravel-dropbox-driver)[dcblogdev/laravel-dropbox

A Laravel Dropbox v2 package

3263.0k](/packages/dcblogdev-laravel-dropbox)[dl/assetsync

Sync files from various sources to neos assets.

1021.4k](/packages/dl-assetsync)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
