|
sendspace API (beta) HowtoBefore 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.
Most methods also require a session_key. A session_key is created in auth.login after a successful authentication. Authentication procedure:
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: http://api.sendspace.com/rest/?method=files.getinfo&session_key=e7s8jvvj5n5u60qm4l6rzkax3a4ucpcg&file_id=6wnhxi 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="http://www.sendspace.com/file/6wnAVV"/> </result> Bad response (unknown method): <result method="files.getinfos" status="fail"> <error code="2" text="Unknown method"/> </result> |
||||||