sendspace API (1.2)

> Upload New File

API How-To

Before you can use the sendspace API, you will need to register for an API key. Creating your free key is easy; you just need to have a sendspace account first, login, and go to API Keys

  • The sendspace API is using REST. All actions should access
  • Every method requires that certain arguments are used. Mandatory arguments must be sent. Non-mandatory can be omitted.
  • All communication with the sendspace API (1.2) assumes a UTF-8 encoding and all methods will return a similarly encoded XML response.
  • The arguments, responses and error codes for each method are listed on the method's specification page. Methods are listed in the Full API Guide.
  • All XML responses are always enclosed in a <result> root element that will hold the method name and the status of the action (OK/Fail).
  • All responses, successful or not, will always return the id of the a file/folder to make it possible to call a few parallel actions.
  • Dates and times are returned in the following formats: "YYYY/MM/DD HH:MM:SS". Times follow EST.

Most methods also require a session_key. A session_key is created in auth.login after a successful authentication.

Authentication procedure:

  1. Send auth.createtoken with api & app information.
  2. Receive token.
  3. Send auth.login with user information and the received token.
  4. Receive a session_key.
  5. Use session_key with all other methods.

We recommended that you use the auth.logout method when the user chooses to exit your application, whenever possible.

Please keep the user session_key in memory/cookie and don't use the full authentication procedure for every method. Reuse the provided session_key.

There is no need to check a session (auth.checksession) before every call. In the case that the session is expired, an error will be returned. Currently an idle session will expire within 30 minutes of inactivity, although this value can change.

Calling a method:

Successful response:

<result method="files.getinfo" status="ok">	        
	<file id="6wnAVV" name="sendspace_api.txt" description="" password="" file_size="231945" upload_time="1185443691" downloads="0" folder_id="0" direct_download_url="" download_page_url=""/>

Bad response (unknown method):

<result method="files.getinfos" status="fail">
        <error code="2" text="Unknown method"/>