Overview

Classes

  • Dropbox\AppInfo
  • Dropbox\ArrayEntryStore
  • Dropbox\AuthBase
  • Dropbox\AuthInfo
  • Dropbox\Client
  • Dropbox\OAuth1AccessToken
  • Dropbox\OAuth1Upgrader
  • Dropbox\Path
  • Dropbox\RootCertificates
  • Dropbox\Security
  • Dropbox\SSLTester
  • Dropbox\Util
  • Dropbox\WebAuth
  • Dropbox\WebAuthBase
  • Dropbox\WebAuthNoRedirect
  • Dropbox\WriteMode

Interfaces

  • Dropbox\ValueStore

Exceptions

  • Dropbox\AppInfoLoadException
  • Dropbox\AuthInfoLoadException
  • Dropbox\DeserializeException
  • Dropbox\Exception
  • Dropbox\Exception_BadRequest
  • Dropbox\Exception_BadResponse
  • Dropbox\Exception_BadResponseCode
  • Dropbox\Exception_InvalidAccessToken
  • Dropbox\Exception_NetworkIO
  • Dropbox\Exception_OverQuota
  • Dropbox\Exception_ProtocolError
  • Dropbox\Exception_RetryLater
  • Dropbox\Exception_ServerError
  • Dropbox\HostLoadException
  • Dropbox\StreamReadException
  • Dropbox\WebAuthException_BadRequest
  • Dropbox\WebAuthException_BadState
  • Dropbox\WebAuthException_Csrf
  • Dropbox\WebAuthException_NotApproved
  • Dropbox\WebAuthException_Provider
  • Overview
  • Class

Dropbox SDK for PHP

Classes summary
Dropbox\AppInfo Your app's API key and secret.
Dropbox\ArrayEntryStore A class that gives get/put/clear access to a single entry in an array.
Dropbox\AuthBase Base class for API authorization-related classes.
Dropbox\AuthInfo

This class contains methods to load an AppInfo and AccessToken from a JSON file. This can help simplify simple scripts (such as the example programs that come with the SDK) but is probably not useful in typical Dropbox API apps.

Dropbox\Client

The class used to make most Dropbox API calls. You can use this once you've gotten an AccessToken via Dropbox\WebAuth.

Dropbox\OAuth1AccessToken

Use with Dropbox\OAuth1Upgrader to convert old OAuth 1 access tokens to OAuth 2 access tokens. This SDK doesn't support using OAuth 1 access tokens for regular API calls.

Dropbox\OAuth1Upgrader

Lets you convert OAuth 1 access tokens to OAuth 2 access tokens. First call OAuth1AccessTokenUpgrader::createOAuth2AccessToken() to get an OAuth 2 access token. If that succeeds, call OAuth1AccessTokenUpgrader::disableOAuth1AccessToken() to disable the OAuth 1 access token.

Dropbox\Path Path validation functions.
Dropbox\RootCertificates See: Dropbox\RootCertificates::useExternalPaths()
Dropbox\Security Helper functions for security-related things.
Dropbox\SSLTester Call the test() method.
Dropbox\Util
Dropbox\WebAuth OAuth 2 "authorization code" flow. (This SDK does not support the "token" flow.)
Dropbox\WebAuthBase The base class for the two auth options.
Dropbox\WebAuthNoRedirect

OAuth 2 code-based authorization for apps that can't provide a redirect URI, typically command-line example apps.

Dropbox\WriteMode Describes how a file should be saved when it is written to Dropbox.
Interfaces summary
Dropbox\ValueStore

A contract for a class which provides simple get/set/clear access to a single string value. Dropbox\ArrayEntryStore provides an implementation of this for storing a value in a single array element.

Exceptions summary
Dropbox\AppInfoLoadException Thrown by the AppInfo::loadXXX methods if something goes wrong.
Dropbox\AuthInfoLoadException Thrown by the AuthInfo::loadXXX methods if something goes wrong.
Dropbox\DeserializeException

If, when loading a serialized RequestToken or AccessToken, the input string is malformed, this exception will be thrown.

Dropbox\Exception The base class for all API call exceptions.
Dropbox\Exception_BadRequest

Thrown when the server tells us that our request was invalid. This is typically due to an HTTP 400 response from the server.

Dropbox\Exception_BadResponse

When this SDK can't understand the response from the server. This could be due to a bug in this SDK or a buggy response from the Dropbox server.

Dropbox\Exception_BadResponseCode Thrown when the the Dropbox server responds with an HTTP status code we didn't expect.
Dropbox\Exception_InvalidAccessToken

The Dropbox server said that the access token you used is invalid or expired. You should probably ask the user to go through the OAuth authorization flow again to get a new access token.

Dropbox\Exception_NetworkIO There was a network I/O error when making the request.
Dropbox\Exception_OverQuota User is over Dropbox storage quota.
Dropbox\Exception_ProtocolError

There was an protocol misunderstanding between this SDK and the server. One of us didn't understand what the other one was saying.

Dropbox\Exception_RetryLater

The Dropbox server said it couldn't fulfil our request right now, but that we should try again later.

Dropbox\Exception_ServerError

The Dropbox server said that there was an internal error when trying to fulfil our request. This usually corresponds to an HTTP 500 response.

Dropbox\HostLoadException Thrown by the Host::loadFromJson method if something goes wrong.
Dropbox\StreamReadException Thrown when there's an error reading from a stream that was passed in by the caller.
Dropbox\WebAuthException_BadRequest Thrown if the redirect URL was missing parameters or if the given parameters were not valid.
Dropbox\WebAuthException_BadState

Thrown if all the parameters are correct, but there's no CSRF token in the session. This probably means that the session expired.

Dropbox\WebAuthException_Csrf

Thrown if the given 'state' parameter doesn't contain the CSRF token from the user's session. This is blocked to prevent CSRF attacks.

Dropbox\WebAuthException_NotApproved Thrown if the user chose not to grant your app access to their Dropbox account.
Dropbox\WebAuthException_Provider Thrown if Dropbox returns some other error about the authorization request.
Dropbox SDK for PHP API documentation generated by ApiGen