Our APIs base URL is https://api.fruithosted.net
API requests must be HTTP/1.1 GET
Make sure to sent requests in HTTPS only
Most requests require an API Login and API Key, which can be located in your User Account Panel at the User Settings tab.
Response in json, structure is as follows:
{
"status": <status-code>,
"msg": "<informational message. might vary, use the status code in your code!>",
"result": <result of the request. varies depending on the request>
}
200: Request Success
400: Bad request (check parameters)
403: Permission denied (wrong API keys or the file does not belong to you)
404: File or Folder not found
451: Not available due to legal reasons.
509: Exceeded bandwidth usage. Try again later or use browser, you might encounter this in peak hours.
50X: Server errors
Delivers detailed information in on errors. You can use these to display the error to your users, please don't use it for check, that's what the STATUS should be used for.
Depending on the request it holds either an array of data or boolean true/false as response.
generating a download
https://api.fruithosted.net/file/dlticket?file={file}&login={login}&key={key}
Name | Description | Example | Required |
---|---|---|---|
file | File-ID | 72fA-_Lq8Ak | yes |
login | API-Login | 5147a8f8e924bc82 | no |
key | API-Key / API-Password | Fa89_X13-37a8CKR | no |
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
"ticket": "72fA-_Lq8Ak~~1440353112~n~~0~nXtN3RI-nsEa28Iq",
"captcha_url": "https://streamango.com/dlcaptcha/b92eY_nfjV4.png",
"captcha_w": 140,
"captcha_h": 70,
"wait_time": 10,
"valid_until": "2015-08-23 18:20:13"
}
}
getting your link by using the generated ticket
https://api.fruithosted.net/file/dl?file={file}&ticket={ticket}&captcha_response={captcha_response}
Name | Description | Example | Required |
---|---|---|---|
file | File-ID | 72fA-_Lq8Ak | yes |
ticket | previously generated download ticket | 72fA-_Lq8Ak~~1440353112~n~~0~nXtN3RI-nsEa28Iq | yes |
captcha_response | result of the captcha, if any | captchas suck | no |
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
"name": "The quick brown fox.txt",
"size": 12345,
"sha1": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
"content_type": "plain/text",
"upload_at": "2011-01-26 13:33:37",
"url": "https://abvzps.example.com/dl/l/4spxX_-cSO4/The+quick+brown+fox.txt",
"token": "4spxX_-cSO4"
}
}
status check of a file / does it exist?
https://api.fruithosted.net/file/info?file={file}&login={login}&key={key}
Name | Description | Example | Required |
---|---|---|---|
file | File-ID(s), single file or comma-separated (max. 50) | 72fA-_Lq8Ak,72fA-_Lq8Ak4,72fA-_Lq8Ak5,72fA-_Lq8Ak6 | yes |
login | API-Login | 5147a8f8e924bc82 | no |
key | API-Key / API-Password | Fa89_X13-37a8CKR | no |
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
"72fA-_Lq8Ak3": {
"id": "72fA-_Lq8Ak3",
"status": 200,
"name": "The quick brown fox.txt",
"size": 123456789012,
"sha1": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
"content_type": "plain/text",
},
"72fA-_Lq8Ak4": {
"id": "72fA-_Lq8Ak4",
"status": 500,
"name": "The quick brown fox.txt",
"size": false,
"sha1": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
"content_type": "plain/text",
},
"72fA-_Lq8Ak5": {
"id": "72fA-_Lq8Ak5",
"status": 404,
"name": false,
"size": false,
"sha1": false,
"content_type": false,
},
"72fA-_Lq8Ak6": {
"id": "72fA-_Lq8Ak6",
"status": 451,
"name": "The quick brown fox.txt",
"size": 123456789012,
"sha1": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
"content_type": "plain/text",
}
}
}
Get the upload URL
Uploads must be POSTed to the upload URL returned by the API and must be encoded in multipart/form-data. e.g.
curl -F [email protected]/your/file.jpg https://1h24hs.streamango.com/ul/uTsFsa5U88
https://api.fruithosted.net/file/ul?login={login}&key={key}&folder={folder}&sha1={sha1}&httponly={httponly}
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | no |
key | API-Key / API-Password | Fa89_X13-37a8CKR | no |
folder | Folder-ID to upload to | 1234 | no |
sha1 | Expected sha1 If sha1 of uploaded file doesn't match this value, upload fails |
2fd4e1c67a2d28fced849ee1bb76e7391b93eb12 | no |
httponly | If this is set to true, use only http upload links | 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12 | no |
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
"url": "https://13abc37.example.com/ul/fCgaPthr_ys",
"valid_until": "2015-01-09 00:02:50"
}
}
Adding a file to Remote Upload
https://api.fruithosted.net/remotedl/add?login={login}&key={key}&url={url}&folder={folder}&headers={headers}
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | yes |
key | API-Key / API-Password | Fa89_X13-37a8CKR | yes |
url | Remote URL | http://google.com/favicon.ico | yes |
folder | Folder-ID to upload to | 1234 | no |
headers | additional HTTP headers, separated by newline (e.g. Cookies or HTTP Basic-Auth) | User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0 Cookie: auth=1234; |
no |
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
"id": "12",
"folderid": "4248"
}
}
Checking the status
https://api.fruithosted.net/remotedl/status?login={login}&key={key}&limit={limit}&id={id}
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | yes |
key | API-Key / API-Password | Fa89_X13-37a8CKR | yes |
limit | Maximum number of results (Default: 5, Maximum: 100) | 5 | no |
id | Remote Upload ID | 1234 | no |
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
24: {
"id": 24,
"remoteurl": "http://proof.ovh.net/files/100Mio.dat",
"status": "new",
"bytes_loaded": null,
"bytes_total": null,
"folderid": "4248",
"added": "2015-02-21 09:20:26",
"last_update": "2015-02-21 09:20:26",
"extid": false,
"url": false
},
22: {
"id": 22,
"remoteurl": "http://proof.ovh.net/files/1Gio.dat",
"status": "downloading",
"bytes_loaded": "823997062",
"bytes_total": "1073741824",
"folderid": "4248",
"added": "2015-02-21 09:20:26",
"last_update": "2015-02-21 09:21:56",
"extid": false,
"url": false
},
20: {
"id": 20,
"remoteurl": "http://google.de/favicon.ico",
"status": "finished",
"bytes_loaded": "229",
"bytes_total": "229",
"folderid": "4248",
"added": "2015-02-21 09:03:47",
"last_update": "2015-02-21 09:04:04",
"extid": "ANAaeBZus-Q",
"url": "https://streamango.com/f/ANAaeBZus-Q"
},
3: {
"id": 3,
"remoteurl": "http://127.0.0.1/",
"status": "error",
"bytes_loaded": "162",
"bytes_total": "162",
"folderid": "4",
"added": "2015-02-17 18:58:11",
"last_update": "2015-02-19 18:07:45",
"extid": false,
"url": false
}
}
}
CConvert your uploaded files into a browser stream friendly version (h.264 o. mp4)
https://api.fruithosted.net/file/convert?login={login}&key={key}&file={file}
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | yes |
key | API-Key / API-Password | Fa89_X13-37a8CKR | yes |
file | File-ID | UPPjeAk--30 | yes |
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": true
}
List currently running file conversions by folder
https://api.fruithosted.net/file/runningconverts?login={login}&key={key}&folder={folder}
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | yes |
key | API-Key / API-Password | Fa89_X13-37a8CKR | yes |
folder | Folder-ID | 5 | no |
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": [
{
"name": "Geysir.AVI",
"id": "3565411",
"status": "pending",
"last_update": "2015-08-23 19:41:40",
"progress": 0.32,
"retries": "0",
"link": "https://streamango.com/f/f02JFG293J8/Geysir.AVI",
"linkextid": "f02JFG293J8"
}
]
}
List the failed file conversions by folder
Not ready yet
Get video thumbnail
https://api.fruithosted.net/file/getsplash?login={login}&key={key}&file={file}
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | yes |
key | API-Key / API-Password | Fa89_X13-37a8CKR | yes |
file | File-ID | AYgHe95d1E4 | yes |
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": "https://streamango.com/splash/AYgHe95d1E4/zt8uSEmk56s.jpg"
}
List the content of your folders
https://api.fruithosted.net/file/listfolder?login={login}&key={key}&folder={folder}
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | yes |
key | API-Key / API-Password | Fa89_X13-37a8CKR | yes |
folder | Folder-ID | 5 | no |
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
"folders": [
{
"id": "5144",
"name": ".videothumb"
},
{
"id": "5792",
"name": ".subtitles"
},
{
"id": "6272",
"name": "test"
},
{
"id": "6288",
"name": "video"
},
{
"id": "6396",
"name": "images"
},
{
"id": "6990",
"name": "tmp"
}
],
"files": [
{
"name": "big_buck_bunny.mp4.mp4",
"sha1": "c6531f5ce9669d6547023d92aea4805b7c45d133",
"folderid": "4258",
"upload_at": "1419791256",
"status": "active",
"size": "5114011",
"content_type": "video/mp4",
"download_count": "48",
"cstatus": "ok",
"link": "https://streamango.com/f/UPPjeAk--30/big_buck_bunny.mp4.mp4",
"linkextid": "UPPjeAk--30"
},
{
"name": "Sintel.2010.1080p.mkv.mp4",
"sha1": "7ca6da73b4f0881bd8dca78e9059e2e6830acce6",
"folderid": "4258",
"upload_at": "1426534681",
"status": "active",
"size": "1116102098",
"content_type": "video/mp4",
"download_count": "37",
"cstatus": "ok",
"link": "https://streamango.com/f/AYgHe95d1E4/Sintel.2010.1080p.mkv.mp4",
"linkextid": "AYgHe95d1E4"
}
]
}
}
Rename a folder
https://api.fruithosted.net/file/renamefolder?login={login}&key={key}&folder={folder}&name={name}
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | yes |
key | API-Key / API-Password | Fa89_X13-37a8CKR | yes |
folder | Folder-ID | 5 | yes |
name | new Folder-Name | my%20new%20foldername | yes |
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": true
}
Rename a file
https://api.fruithosted.net/file/rename?login={login}&key={key}&file={file}&name={name}
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | yes |
key | API-Key / API-Password | Fa89_X13-37a8CKR | yes |
file | File ID | UPPjeAk--30 | yes |
name | new File-Name | My%20File%20Backup_2017.zip | yes |
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": true
}
Get account related information e.g. rewards, ID etc.
https://api.fruithosted.net/account/info?login={login}&key={key}
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | yes |
key | API-Key / API-Password | Fa89_X13-37a8CKR | yes |
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
"extid": "extuserid",
"email": "[email protected]",
"signup_at": "2015-01-09 23:59:54",
"storage_left": -1,
"storage_used": "32922117680",
"traffic": {
"left": -1,
"used_24h": 0
},
"balance": 0
}
}