API
Account
Download
Upload
Remote Upload
File/Folder Management
Converting files
General Information
Base-URL for our API is https://api.userload.co/1 (note the 1 for version 1 behind the /)
All requests to the API shall be HTTP/1.1 GET
Please make sure to use the API with https only.
Most requests require a API Login & API Key, you can find both in the User Panel at the "User Settings" Tab.
Response is json, structure is as follows:
{
"result": <result of the request. varies depending on the request>,
"status": <status-code>,
"msg": "<informational message. might vary, use the status code in your code!>"
}
status
200: Everything is OK. Request succeeded
400: Bad request (e.g. wrong parameters)
403: Permission denied (wrong api login/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 or use Browser Download. (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
Account Infos
Everything account related (total used storage, reward, ...)
Request
https://api.userload.co/1/account/info?login={login}&key;={key}
Parameters
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | yes |
key | API-Key / API-Password | fcd723ab2487 | yes |
Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
"username":"username",
"email": "hawkeye@userload.co",
"signup_at": "2015-01-09 23:59:54",
"storage_left":"unlimited",
"storage_used": "32922117680",
"balance": 0
}
}
Download Link
Coming soon ...
File Info
check the status of a file, e.g. if the file exists
Request
https://api.userload.co/1/file/info?login={login}&key={key}&file_code={file}
Parameters
Name | Description | Example | Required |
---|---|---|---|
file_code | File-Code | fcd723ab2487 | yes |
login | API-Login | 5147a8f8e924bc82 | no |
key | API-Key / API-Password | e01359zaz357e | no |
Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
"name":"listen quran.mp3",
"file_code":"71e9b546763c",
"size":"1953",
"upload_at":"2020-08-30 13:53:02",
"status":"active",
"views":"0",
"folder_id":"5",
"last_view":"",
"content_type":"image\/png",
"direct_link":"https:\/\/userload.co\/f\/71e9b546763c"
}
}
Upload
normal upload via api
Uploads shall be POSTed to the upload URL and shall be multipart/form-data encoded. Example with curl:
curl \ -F "login={your_api_login}" \ -F "key={your_api_key}" \ -F "file=@yourfile" \ https://api.userload.co/1/file/upload
Request
https://api.userload.co/1/file/upload?login={login}&key={key}&folder_id={folder}
Parameters
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | no |
key | API-Key / API-Password | fcd723ab2487 | no |
folder_id | Folder-ID to upload to | 1234 | no |
Response
200 (OK)
Content-Type: application/json
{
"msg":"OK",
"status":200,
"result":
{
"name":"test.mp4",
"size":"1988845806",
"url":"https://userload.co/f/fcd723ab2487",
"file_code":"fcd723ab2487",
"folder_id":"NULL"
}
}
Add Remote Upload
Remote Uploading a file
Request
https://api.userload.co/1/file/remotedl?login={login}&key={key}&url={url}&folder_id={folder}&headers={headers}
Parameters
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | yes |
key | API-Key / API-Password | fcd723ab2487 | yes |
url | Remote URL | http://google.com/favicon.ico | yes |
folder_id | 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 |
Response
200 (OK)
Content-Type: application/json
{
"result": {
"id":"248",
"file_code":"fcd723ab2487",
"folder_id":"5"
},
"status":200,
"msg":"OK"
}
Check Remote Upload Status
Check Status of Remote Upload
Request
https://api.userload.co/1/file/status?login={login}&key;={key}&id;={id}
Parameters
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | yes |
key | API-Key / API-Password | fcd723ab2487 | yes |
id | Remote Upload ID | 1234 | no |
Response
200 (OK)
Content-Type: application/json
{
"result":{
"id":"258",
"remoteurl":"http://google.de/favicon.ico",
"status":"complete",
"bytes_loaded":"0",
"bytes_total":"0",
"folder_id":"5",
"added":"0000-00-00 00:00:00",
"last_update":"2020-08-31 14:18:43",
"file_code":"9a0b9f0805de",
"download_percent":"0"
}
,"status":200,
"msg":"OK"
}
List Folder
Shows the content of your folders
Request
https://api.userload.co/1/folder/listing?login={login}&key;={key}&folder_id={folder}
Parameters
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | yes |
key | API-Key / API-Password | fcd723ab2487 | yes |
folder_id | Folder-ID | 5 | no |
Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
"folders": [
{
"id": "6272",
"name": "test"
},
{
"id": "6288",
"name": "video"
},
{
"id": "6396",
"name": "images"
},
{
"id": "6990",
"name": "tmp"
}
],
"files": [
{
"name":"listen quran.mp3",
"file_code":"71e9b546763c",
"size":"1953",
"upload_at":"2020-08-30 13:53:02",
"status":"active",
"views":"0",
"folder_id":"5",
"last_view":"",
"content_type":"image\/png",
"direct_link":"https://userload.co/f/71e9b546763c"
},
{
"name":"listen quran.mp3",
"file_code":"71e9b546763c",
"size":"1953",
"upload_at":"2020-08-30 13:53:02",
"status":"active",
"views":"0",
"folder_id":"5",
"last_view":"",
"content_type":"image\/png",
"direct_link":"https://userload.co/f/71e9b546763c"
}
]
}
}
Rename Folder
Set a new name for a folders
Request
https://api.userload.co/1/folder/rename?login={login}&key={key}&folder_id={key}&folder_name={name}
Parameters
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | yes |
key | API-Key / API-Password | fcd723ab2487 | yes |
folder_id | Folder-ID | 5 | yes |
name | new Folder-Name | my%20new%20foldername | yes |
Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": true
}
Rename File
Set a new name for a file
Request
https://api.userload.co/1/file/rename?login={login}&key={key}&file_code={file}&name={name}
Parameters
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | yes |
key | API-Key / API-Password | fcd723ab2487 | yes |
file_code | File ID | UPPjeAk--30 | yes |
name | new File-Name | My%20File%20Backup_2017.zip | yes |
Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": true
}
Delete File
Remove one of your files
Request
https://api.userload.co/1/file/delete?login={login}&key={key}&file_code={file}
Parameters
Name | Description | Example | Required |
---|---|---|---|
login | API-Login | 5147a8f8e924bc82 | yes |
key | API-Key / API-Password | fcd723ab2487 | yes |
file_code | File ID | UPPjeAk--30 | yes |
Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": true
}
Converting Files
Coming soon ...
Show running file converts
Coming soon ...
Show failed file converts
Coming soon ...
Get splash image
Coming soon ...