

HOW TO USE DROPBOX CODE
I placed my code in a subdirectory of my local Apache set-up so that it’s reachable at the URL The directory structure is: When the app is ready for release, we can apply for productions status and the Dropbox team will review it to make sure that it conforms to their terms and conditions and branding guidelines. This allows us to start developing immediately and enables up to five other users to test it. Newly created application are in “Development status”. Once your application is created, there will be an options page where you can edit its details and find its access credentials. By selecting “Full Dropbox” the application will see the user’s entire Dropbox. The recommended value is “App folder”, a sandbox directory that will be created inside the user’s home. The access type parameter specifies where your application will be able to read and write files. Dropbox will ask you for a name, description, and access type for your application. Log into the Developers Center and follow the “MyApps” link, then select “Create an App”. We’ll need these keys to “introduce” our application and ask for authorization. Underneath the session object there is a DropboxRESTClient object to perform the HTTP calls using cURL.įirst of all we need to register our application with Dropbox in order to obtain a unique API key pair. The client object will then use the session object to perform the API calls and get the data. The first will take care of the hard part: obtaining and managing access credentials from Dropbox. We’ll have a DropboxSession object and a DropboxClient object. Our client will be structured more like the official Python client, but I took some ideas and code from the PHP SDK above, especially for the OAuth part. There’s a link to a third party PHP SDK on Github. You can also download the official SDKs, but PHP isn’t listed among the supported languages.

Your starting point for anything related to development with Dropbox should be the Dropbox Developers Center where you can find the API reference along with its basic concepts and best practices. To run the code, you’ll need PHP with cURL support and obviously a Dropbox account.
HOW TO USE DROPBOX FULL
To keep the article short and readable, I’ll keep the included code to a minimum and instead refer you to the full code available on GitHub. The client will perform some basic operations, such as authentication, listing files, and uploading and downloading files. In this article we’ll explore the Dropbox PHP API by building a simple client for accessing files in a Dropbox account.
