|
|
| Home |
Hotfile API
Welcome to the Hotfile API. What we have here is a small collection of api calls that you can use to obtain information about hotfile files and to do certan actions. We are looking forward to see current users and developers using it.
We've kept things pretty simple. All api calls should be sent to:
Every specific method should be called with get parameter action:
| http://api.hotfile.com/?action=some_method |
Additional parameters should be added as get parameters also:
| http://api.hotfile.com/?action=some_action¶meter1=value1 |
Quick overview of the methods:
| Method |
Login |
Premium |
Returns |
| checklinks |
No |
No |
Checks list of links for availability |
| getdigest |
No |
No |
Returns digest that is valid for 30 seconds for digest login. |
| getdirectdownloadlink |
Yes |
Yes |
Returns direct download link for premium download |
| getuploadserver |
No |
No |
Return a one or more of the least loaded upload servers, please use before every upload. |
| createfolder |
Yes |
No |
Creates a folder. If it already exists, no error is returned and the reply contains the details of the existing folder |
| deletefolder |
Yes |
No |
Deletes a folder, non-empty folders can be deleted and their contents are moved to the root folder |
| renamefolder |
Yes |
No |
Renames and/or moves a folder |
| deletefile |
Yes |
No |
Deletes an uploaded file |
| undeletefile |
Yes |
No |
Undeletes a deleted file if it is still not physically deleted from our servers |
| hotlinkfile |
Yes |
Yes |
Sets or clears hotlink setting for file |
| getuserinfo |
Yes |
No |
Shows user's premium info and hotlink traffic. |
| getdirectdownloadlinks |
Yes |
No |
Returns the directdownload links of given list of files. |
| sendvalidationcode |
Yes |
No |
Sends validation code to the user's email. |
| changepassword |
Yes |
No |
Change password. |
| getdownloadlinksfrompublicdirectory |
Yes |
No |
Get download links from public directory. Uses the params from the public links. Example: http://hotfile.com/list/9999/23sdfk0 , folder: 9999, hash: 23sdfk0 |
Login and Premium
If a method requires login, this means that login information must be attached to each and every api call you make for that method. And if premium is required, the user described by the login information must be a premium one.
You can attach to an api call login information consisting either of:
Username and password (plain text):
| username=username&password=password |
In case you don't want to send plain password you can send md5ed one:
$passwordmd5 = md5('password'); username=username&passwordmd5=$passwordmd5 |
And finally, instead of password you can send md5 of md5 of password and digest, and the digest itself that you can request from hotfile once on every 30 seconds, See getdigest. Example:
$digest = getdigest(); // your function that does api call for the digest $passwordmd5dig = md5(md5('password').$diggest); username=username&passwordmd5dig=$passwordmd5dig&digest=$digest |
Uploading
In order to upload, first you need to call getuploadserver to get upload server that you can use for the upload. Next, based on the upload server you receive you need to call
http://%uploadserver%.hotfile.com/segmentupload.php with one of the following actions.
| ?action=start | Starts the upload of a file. |
| Parameters: |
|
- size (number): file size
|
| Returns: Upload id |
| ?action=upload | Uploads a piece of the file. |
| Parameters: |
- id (number): upload id (the one from start)
- offset (number): offset of the segment in the file
- segment (file): the segment of the file
|
| Returns: OK if everythning went well. |
| ?action=finish | Finish upload. |
| Parameters: |
- id (number): upload id
- name (string): name of the file
|
| Returns: URL with the links for the file. |
Help & Support
If you need help or want to suggest new api calls, don't hesitate to contact us at api <at> hotfile.com
|
|