Install Core API SDKs

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.

Ruby SDK

You can also install the Dropbox gem and its dependencies via RubyGems (you may need sudo).

gem install dropbox-sdk

That's it. Once you import the Dropbox gem into your app, you'll be able to use all the Core API methods.

Example scripts

Download and uncompress the latest version of the Ruby SDK. Among the materials included in the SDK are three code examples:

  • cli_example.rb is a very basic command line interface for your Dropbox.
  • dropbox_controller.rb is a Ruby on Rails 3 controller that sends the user through the authentication process and then allows them to upload a file to their Dropbox.
  • web_file_browser.rb is an example web app that lets you browse and upload files to Dropbox. For ease of compatibility, these examples reference a local copy of the library you installed with RubyGems, located in lib/dropbox_sdk.rb.

To get these examples running, you'll need to edit each script to enter your app key and secret where indicated. Also make sure that the access type is set to :app_folder or :dropbox as configured for your app.