Uploads.mobi API
General Information
Please note: This API has been adapted to match the specification from other services. However there are small differences, be aware of them!
Base-URL for our API is https://api.uploads.mobi
All requests to the API shall be HTTP GET
or POST
Please make sure to use the API with https
only, http
requests will result in a HTTP 302
redirect to https
.
Most requests require an API Key, you can find both in the User Panel at the "API Key".
Response is 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>
}
status
200: Everything is OK. Request succeeded
400: Bad request (e.g. wrong parameters)
403: Permission denied (wrong api key, action on a file which does not belong to you, ...)
404: File not found
451: Unavailable For Legal Reasons
509: Bandwidth usage exceeded. Please try again later. (you might see this during peak hours)
50x: Server errors. You should not see this, but be prepared.
msg
This message gives more detailed information in case there is an error.
You can use this for displaying it to the user, but please don't use it for checking if the request succeeded. That's what the status code is for.
result
holds the response of the request if succeeded. Might hold an array of data or just a boolean true/false, depending on the request
Everything account related (total used storage, reward, etc)
Request
https://api.uploads.mobi/account/info?key={key}
Parameters
Name | Description | Example | Required |
---|---|---|---|
key | API-Key | 1234567890 | yes |
Response
200 (OK)
Content-Type: application/json
{
"msg":"OK",
"server_time":"2020-06-17 08:18:06",
"result":{
"premium_link_left":9999,
"storage_used":"0",
"storage_left":536308200751,
"balance":"0.00000",
"premium_expire":"0000-00-00 00:00:00",
"email":"[email protected]"
},
"status":200
}
Get Upload Server
Request
https://api.uploads.mobi/upload/server?key={key}
Parameters
Name | Description | Example | Required |
---|---|---|---|
key | API-Key | 1234567890 | yes |
Response
200 (OK)
Content-Type: application/json
{
"server_time":"2020-06-17 09:16:19",
"result":"https://a.u-p.pw/upload/",
"sess_id":"1234567890",
"status":200,
"msg":"OK"
}
Upload To Server
Uploads shall be POSTed to the upload URL returned by our API and shall be multipart/form-data encoded. Example with curl:
curl -F "[email protected]/path/to/file1.mp4" -F "[email protected]/path/to/file2.mp4" -F "sess_id=1234567890" -F "to_folder=0" https://a.u-p.pw/upload/
Response
200 (OK)
Content-Type: application/json
[
{
"file_status":"OK",
"file_code":"6r08l2oml14u"
},
{
"file_code":"xlaguvbz7i9k",
"file_status":"OK"
}
]
Get a download link
Request
https://api.uploads.mobi/file/get_direct_link?key={key}&file_code={file}&ip={ip}
Parameters
Name | Description | Example | Required |
---|---|---|---|
key | API-Key | 1234567890 | yes |
file | File-ID | v8z3gp7c1a7k | yes |
IP | Request IP | 1.1.1.1 (Request IP Download Speed 1-2Mb/s) | no |
Response
200 (OK)
Content-Type: application/json
{
"status":200,
"msg":"OK",
"server_time":"2020-06-17 08:25:44",
"result":{
"ip":"1.1.1.1",
"size":14185472,
"url":"https://b.u-p.pw/download/26245i6z4hvhuf6t4kpzhl3f7ju4tfhhodue5gjqqjn7pkepdgsbfl7krxg6qu7wmuzy6ydn/MPC-HC.1.7.13.x64.exe"
}
}
File Info
check the status of a file, e.g. if the file exists
Request
https://api.uploads.mobi/file/info?key={key}&file_code={file}
Parameters
Name | Description | Example | Required |
---|---|---|---|
key | API-Key | 1234567890 | yes |
file | File-ID(s), single file or comma-separated (max. 100) | b6zom3ctqp64,v8z3gp7c1a7k,oxq3i55l1cgq | yes |
Response
200 (OK)
Content-Type: application/json
{
"status":200,
"server_time":"2020-06-17 09:41:30",
"msg":"OK",
"result":[
{
"filecode":"b6zom3ctqp64",
"status":200,
"size":770923,
"name":"horizon.jpg",
"downloads":0,
"uploaded":"2020-06-17 09:03:57",
"image":"https://cdn.u-p.pw/img/vr173ou0tr8o.jpg"
},
{
"filecode":"v8z3gp7c1a7k",
"status":200,
"size":14185472,
"name":"MPC-HC.1.7.13.x64.exe",
"downloads":3,
"uploaded":"2020-06-15 23:09:50",
"image":null
},
{
"size":3533958,
"filecode":"oxq3i55l1cgq",
"status":200,
"uploaded":"2020-06-17 08:31:34",
"downloads":0,
"name":"Odin3_v3.13.1.zip",
"image":null
}
]
}
File List
Shows the content of your folders
Request
https://api.uploads.mobi/file/list?key={key}&page={page}&per_page={per_page}&fld_id={folder}&public={public}&name={name}
Parameters
Name | Description | Example | Required |
---|---|---|---|
key | API-Key | 1234567890 | yes |
page | Page number | 2 | no |
per_page | Number of results per page | 10 | no |
fld_id | Folder id | 2 | no |
public | Show public (1) or private (0) files only | 1 | no |
name | Filter file names | Video Bagus | no |
Response
200 (OK)
Content-Type: application/json
{
"server_time":"2020-06-17 09:04:04",
"status":200,
"result":{
"results":3,
"files":[
{
"file_code":"b6zom3ctqp64",
"public":1,
"fld_id":0,
"uploaded":"2020-06-17 09:03:57",
"name":"horizon-1591959927229-219.jpg",
"size":770923,
"downloads":0,
"link":"https://uploads.mobi/b6zom3ctqp64",
"image":"https://cdn.u-p.pw/img/vr173ou0tr8o.jpg"
},
{
"link":"https://uploads.mobi/oxq3i55l1cgq",
"image":null,
"size":3533958,
"downloads":0,
"uploaded":"2020-06-17 08:31:34",
"name":"Odin3_v3.13.1.zip",
"fld_id":0,
"file_code":"oxq3i55l1cgq",
"public":1
},
{
"downloads":3,
"size":14185472,
"image":null,
"link":"https://uploads.mobi/v8z3gp7c1a7k",
"uploaded":"2020-06-15 23:09:50",
"name":"MPC-HC.1.7.13.x64.exe",
"fld_id":0,
"public":1,
"file_code":"v8z3gp7c1a7k"
}
],
"results_total":3
},
"msg":"OK"
}
Rename File
Renames a File
Request
https://api.uploads.mobi/file/rename?key={key}&file_code={file}&name={name}
Parameters
Name | Description | Example | Required |
---|---|---|---|
key | API-Key | 1234567890 | yes |
file | File-ID | b6zom3ctqp64 | yes |
name | new file name | horizon.jpg | yes |
Response
200 (OK)
Content-Type: application/json
{
"server_time":"2020-06-17 09:10:26",
"msg":"OK",
"status":200,
"result":"true"
}