To make things as easy as possible, we have several platform SDKs you can import into your development environment to get up and running quickly. The SDKs contain platform-specific libraries that wrap the raw HTTP calls to the Dropbox API. They are designed to shorten the distance between your application and integrating Dropbox.
The SDK is contained in the lib/ folder in the zip file so copy lib/ into your project and name it dropbox-sdk/ and include it in your app:
require_once "dropbox-sdk/Dropbox/autoload.php";
If you're using Composer for your project's dependencies, you can just add dropbox-sdk to your composer.json instead of downloading the SDK.
"require": { "dropbox/dropbox-sdk": "1.1.*" }
There are a couple sample scripts in the example folder:
/account/info
endpoint.To get these examples running, you'll need provide your app key and secret to the SDK.
The PHP SDK comes with a function to load an API key and secret from a JSON file. For example, create a file called app-info.json with the following contents:
{ "key": "INSERT_APP_KEY", "secret": "INSERT_SECRET" }
Save this file to the same directory as your app then add this line to your app:
$appInfo = dbx\AppInfo::loadFromJsonFile("config.json");