ApiOverview

Page history last edited by jeremy@... 1 wk ago

Getting Started with the Box.net API


 

Overview

 

You can use the Box.net API to create applications and Web sites that integrate with Box.net. The Box.net API is a collection of Web services, which means that you can create Box applications using any modern programming language and operating system on any computer connected to the internet.

 

Box applications can perform the following functions:

 

  • Store and retrieve files from Box.net
  • Organize files into folders
  • Move, rename and delete files
  • Share files

 

Initial Setup

 

Registration

 

Before you do anything, you'll need to register your new application or service in order to obtain a Box.net API key, since you'll need to pass in your API key with every API call you make. You may register a new application by going to the services page as follows:

 

 

From there, select "Create Service" to begin creating a new Box service.

 

 

Once you complete the setup process, that page will provide you with the necessary API key for your service or application.

 

Authentication

 

Now that you have your OpenBox service set up,  you will want to get started with the API methods.  The first step to using the Box API in your code is to register and authenticate a user.  For more information on how to handle this process, please visit our instructional page for authentication.

 

Starting with Common API Methods

 

At this point, most applications either want to show theis user the files in one's Box account, or enable the user to upload a file to Box.

 

To show a complete list of the user's files and folders, you can use the get_account_tree call. This call retrieves an XML document describing the entire contents of the user's box, including files and folders. You can also pass the ID of a folder as a parameter to this call, enabling your application to retrieve a subset of the tree structure.

 

To upload a file, your application can perform an HTTP POST to a URL of the form:

 

 

At the time you upload a file using HTTP POST, you can also specify whether you want the file to be publicly sharable (as described in the Upload and Download reference documentation). More information on upload methods can be found at the uploading and downloading instructional page.  You can also share a file after it's been uploaded using the public_share API  method.

 

All functions available to you with our API can be found on the sidebar to your right (go back to the top).

 


 

Need additional assistance? Please feel free to Contact us