📘 Overview
The Rediafile API allows you to securely integrate file upload, management, and download directly into your own applications. All endpoints return JSON responses encoded in UTF-8.
Base URL
Technical requirements
| Aspect | Specification |
|---|---|
| Encoding | UTF-8 required for all strings |
| Protocol | HTTPS strongly recommended (SSL required) |
| HTTP Method | POST (unless otherwise noted) |
| Date format | Y-m-d H:i:s (e.g. 2026-08-01 14:12:11) |
| Content-Type | application/x-www-form-urlencoded or multipart/form-data for uploads |
🚀 Quick start
In 3 steps, make your first API call:
Log in to your Rediafile account → Account Settings → API Access. You will find Key 1 and Key 2 (64 characters each).
curl -X POST https://rediafile.com/cloud/api/v2/authorize \ -d "username=your_username" \ -d "password=your_password"
curl -X POST https://rediafile.com/cloud/api/v2/account/info \ -d "access_token=YOUR_TOKEN" \ -d "account_id=YOUR_ACCOUNT_ID"
🔐 Authentication
All API requests require a valid access_token and account_id. These are obtained via the /authorize endpoint by submitting your account credentials or API keys.
access_token can be reused multiple times. Do not generate a new token for each request. Tokens expire automatically after 1 hour of inactivity.
POST /authorize
Provides an access_token and account_id for subsequent requests.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
username | string | Yes* | Account username |
password | string | Yes* | Account password |
key1 | string (64) | Yes* | API Key 1 (from Account Settings) |
key2 | string (64) | Yes* | API Key 2 (from Account Settings) |
* Either username/password OR key1/key2. API keys are recommended for automated integrations.
Success response
{
"data": {
"access_token": "X3Xp6cUcue22Q3AlpCiZz3mJQWPT2v10zZqGblSGzVIqZiMoV4ou8LeYH4SKAUL9...",
"account_id": "158642"
},
"_status": "success",
"_datetime": "2026-08-01 14:12:11"
}
Possible errors
| Message | Cause |
|---|---|
| Please provide a username. | Missing username parameter |
| Please provide a password. | Missing password parameter |
| Please provide key1. It must be 64 characters. | Invalid API Key 1 |
| Please provide key2. It must be 64 characters. | Invalid API Key 2 |
| Could not authenticate user. | Invalid credentials or locked account |
| Failed issuing access token. | Internal generation error |
POST /disable_access_token
Deactivates an active access_token. Optional — tokens expire automatically after 1 hour of inactivity.
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Token to disable |
account_id | string | Yes | Account ID |
⚠️ HTTP error codes
Errors are returned via standard HTTP status codes. Additional details are included in the JSON response body.
| Code | Description | Recommended action |
|---|---|---|
| 400 | Bad input parameter | Check sent parameters |
| 401 | Bad or expired token | Re-authenticate via /authorize |
| 404 | File not found | Verify file_id or short_url |
| 405 | Method not expected | Use POST (or GET if specified) |
| 429 | Rate limit reached | Reduce request frequency |
| 5xx | Server error | Retry later or contact support |
JSON error format
{
"status": "error",
"response": "Could not authenticate user. The username and password may be invalid...",
"_datetime": "2026-08-01 14:12:11"
}
👤 Account
POST /account/info
Provides details of the account associated with the account_id.
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Access token |
account_id | string | Yes | Account ID |
Response
{
"data": {
"id": "158642",
"username": "admin",
"level_id": "20",
"email": "email@yoursite.com",
"lastlogindate": "2017-02-18 11:43:39",
"lastloginip": "192.168.33.1",
"status": "active",
"title": "Mr",
"firstname": "Admin",
"lastname": "User",
"languageId": "1",
"datecreated": null,
"lastPayment": "2011-12-27 13:45:22",
"paidExpiryDate": null,
"storageLimitOverride": null
},
"_status": "success",
"_datetime": "2026-08-01 14:12:11"
}
POST /account/package
Provides the account restrictions inherited from the associated plan.
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Access token |
account_id | string | Yes | Account ID |
Key response fields
| Field | Description |
|---|---|
label | Plan name (e.g. "Premium Account") |
max_upload_size | Max upload size in bytes |
can_upload | 1 = upload allowed, 0 = not |
concurrent_uploads | Max concurrent uploads |
max_remote_download_urls | Max remote URLs (50 default) |
level_type | Account type ("paid user", etc.) |
📁 Files
POST /file/upload
File upload interface. Note: Chunked uploads are not yet supported.
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Access token |
account_id | string | Yes | Account ID |
upload_file | file | Yes | File to upload (multipart/form-data) |
folder_id | string | No | Target folder ID (root if empty) |
multipart/form-data with the file attached.
Success response
{
"response": "File uploaded",
"data": [{
"name": "sample4_l.jpg",
"size": "149084",
"type": "application/octet-stream",
"url": "https://rediafile.com/2Vv",
"delete_url": "https://rediafile.com/2Vv~d?41efa710444abad11a8f4b5a90e4d746",
"info_url": "https://rediafile.com/2Vv~i",
"stats_url": "https://rediafile.com/2Vv~s",
"short_url": "2Vv",
"file_id": "1253",
"unique_hash": "60b0be7e3b18de9a3f00d940a8e5a9834c6cdc0f49d40af64973be5ca504c4fd",
"url_html": "<a href=...>view sample4_l.jpg on Rediafile</a>",
"url_bbcode": "[url]https://rediafile.com/2Vv[/url]"
}],
"_status": "success",
"_datetime": "2026-08-01 14:12:11"
}
POST /file/download
Generates a unique download URL for a file.
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Access token |
account_id | string | Yes | Account ID |
file_id | string | Yes* | Numeric file ID |
short_url | string | Yes* | Short URL of the file |
* Either file_id OR short_url is required.
Response
{
"data": {
"file_id": "1253",
"filename": "sample4_l.jpg",
"download_url": "https://rediafile.com/2Vv?download_token=c3e6289a23e9819d8663569da96087d0..."
},
"_status": "success",
"_datetime": "2026-08-01 14:12:11"
}
POST /file/url_upload_add
Imports a file from an external URL. Available only if background URL download is enabled.
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Access token |
account_id | string | Yes | Account ID |
file_url_base64 | string | Yes | External URL encoded in base64 |
folder_id | string | No | Target folder ID |
Response
{
"response": "File download from URL scheduled",
"data": {
"scheduled_item_id": 52,
"url": "https://yetishare.com/_include/images/yetishare_logo.png"
},
"_status": "success",
"_datetime": "2026-08-01 14:12:11"
}
POST /file/url_upload_status
Displays the status of a scheduled URL download.
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Access token |
account_id | string | Yes | Account ID |
scheduled_item_id | int | Yes | ID returned from /file/url_upload_add |
Response (status "complete")
{
"response": "Scheduled URL file download found",
"data": {
"scheduled_item_id": 51,
"status": "complete",
"created": "2024-01-25 19:34:52",
"started": "2024-01-25 20:24:53",
"finished": "2024-01-25 20:24:54",
"total_size": 17262,
"downloaded_file": {
"file_id": 11456,
"name": "file_upload_script_logo.png",
"size": 17262,
"url": "https://rediafile.com/sZG/file_upload_script_logo.png"
}
},
"_status": "success",
"_datetime": "2026-08-01 14:12:11"
}
POST /file/info
Provides metadata and URLs for a file.
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Access token |
account_id | string | Yes | Account ID |
file_id | string | Yes | File ID |
POST /file/edit
Modifies file metadata.
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Access token |
account_id | string | Yes | Account ID |
file_id | string | Yes | File ID to modify |
filename | string | No | New name (empty = unchanged) |
fileType | string | No | New MIME type (e.g., application/octet-stream) |
folder_id | string | No | New parent folder ID (empty = unchanged) |
POST /file/delete
Deletes an active file (moves to trash).
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Access token |
account_id | string | Yes | Account ID |
file_id | string | Yes | File ID to delete |
POST /file/move
Moves a file to another folder.
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Access token |
account_id | string | Yes | Account ID |
file_id | string | Yes | File ID |
new_parent_folder_id | string | Yes | Destination folder ID |
POST /file/copy
Copies a file to another folder.
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Access token |
account_id | string | Yes | Account ID |
file_id | string | Yes | Source file ID |
copy_to_folder_id | string | Yes | Destination folder ID |
Response
{
"response": "File successfully copyied.",
"original_file": { "data": { "id": "1162", "filename": "...", "shortUrl": "2U2" } },
"new_file": { "data": { "id": "1254", "filename": "...", "shortUrl": "2Vw" } },
"_status": "success",
"_datetime": "2026-08-01 14:12:11"
}
📂 Folders
POST /folder/create
Creates a new folder.
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Access token |
account_id | string | Yes | Account ID |
folder_name | string | Yes | New folder name |
parent_id | string | No | Parent folder ID |
is_public | int | No | 0=Private, 1=Unlisted, 2=Public (default: 0) |
access_password | string (32) | No | MD5 hash of password (32 chars) |
POST /folder/listing
Returns the list of folders and files in a parent folder.
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Access token |
account_id | string | Yes | Account ID |
parent_folder_id | string | No | Parent folder ID (empty = root) |
Response
{
"data": {
"folders": [ { "id": "123", "folderName": "My Folder 1", ... } ],
"files": [ { "id": "1161", "filename": "button_back.gif", "shortUrl": "2U1", ... } ]
},
"_status": "success",
"_datetime": "2026-08-01 14:12:11"
}
POST /folder/info
Provides information about a specific folder.
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Access token |
account_id | string | Yes | Account ID |
parent_folder_id | string | No | Folder ID |
POST /folder/edit
Modifies an existing folder.
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Access token |
account_id | string | Yes | Account ID |
folder_id | string | Yes | Folder ID to modify |
folder_name | string | No | New name |
parent_id | string | No | New parent folder |
is_public | int | No | 0=Private, 1=Unlisted, 2=Public |
access_password | string (32) | No | MD5 hash of password |
POST /folder/delete
Deletes a folder.
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Access token |
account_id | string | Yes | Account ID |
folder_id | string | Yes | Folder ID to delete |
POST /folder/move
Moves a folder to another location.
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | Access token |
account_id | string | Yes | Account ID |
folder_id | string | Yes | Folder ID to move |
new_parent_folder_id | string | Yes | Destination folder ID |
💻 Code examples
cURL — Authentication
curl -X POST https://rediafile.com/cloud/api/v2/authorize \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "username=admin" \ -d "password=your_password"
cURL — File upload
curl -X POST https://rediafile.com/cloud/api/v2/file/upload \ -F "access_token=YOUR_TOKEN" \ -F "account_id=YOUR_ACCOUNT_ID" \ -F "upload_file=@/path/to/your/file.zip" \ -F "folder_id=123"
PHP — Complete upload
<?php
$token = 'YOUR_ACCESS_TOKEN';
$accountId = 'YOUR_ACCOUNT_ID';
$filePath = '/path/to/file.jpg';
$ch = curl_init('https://rediafile.com/cloud/api/v2/file/upload');
$postData = [
'access_token' => $token,
'account_id' => $accountId,
'upload_file' => new CURLFile($filePath)
];
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);
echo "URL: " . $data['data'][0]['url'];
curl_close($ch);
?>
Python — Download from URL
import requests, base64
url = "https://rediafile.com/cloud/api/v2/file/url_upload_add"
payload = {
"access_token": "YOUR_TOKEN",
"account_id": "YOUR_ACCOUNT_ID",
"file_url_base64": base64.b64encode(b"https://example.com/image.png").decode(),
"folder_id": "123"
}
response = requests.post(url, data=payload)
print(response.json())
JavaScript (Node.js) — List folders
const axios = require('axios');
async function listFolders() {
const res = await axios.post('https://rediafile.com/cloud/api/v2/folder/listing', {
access_token: 'YOUR_TOKEN',
account_id: 'YOUR_ACCOUNT_ID',
parent_folder_id: '' // root
});
console.log(res.data.data.folders);
}
listFolders();
JavaScript (Fetch) — Generate download link
fetch('https://rediafile.com/cloud/api/v2/file/download', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({
access_token: 'YOUR_TOKEN',
account_id: 'YOUR_ACCOUNT_ID',
file_id: '1253'
})
})
.then(r => r.json())
.then(data => console.log(data.data.download_url));
✅ Best practices
All requests must use HTTPS. Enforce SSL server-side to ensure token and data security.
An access_token remains valid for 1 hour. Store it in session and reuse it for all requests instead of regenerating a token for each call.
Always check _status in the JSON response. On error ("error"), read the response field for the detailed message.
For /file/url_upload_add, always encode the URL in base64 before sending. Use utf-8 for all text.
Chunked uploads are not yet supported. For large files, use /file/url_upload_add or check max_upload_size via /account/package.
📊 Limits & Restrictions
| Aspect | Value / Behavior |
|---|---|
| Token expiration | 1 hour of inactivity |
| Rate limiting | HTTP 429 if limit reached |
| Upload chunks | Not currently supported |
| Remote URL upload | Max 50 URLs (depending on plan) |
| Encoding | UTF-8 required |
| API keys | Exactly 64 characters |
| Folder password | MD5 hash, 32 characters |
/account/package for your current restrictions.
❓ FAQ
Log in to your Rediafile account → Account Settings → API Access. You will see Key 1 and Key 2. Each key is exactly 64 characters.
Yes, the /authorize endpoint accepts either username + password or key1 + key2. API keys are recommended for automated integrations as they don't change when you change your password.
Call /authorize again to obtain a new access_token. Tokens expire after 1 hour of inactivity.
Use the folder_id parameter in /file/upload. Get the folder ID via /folder/listing.
Chunked uploads are not yet available. Max size depends on your plan (see /account/package → max_upload_size). For very large files, use /file/url_upload_add.
Yes, the API is compatible with all platforms. Use standard HTTP POST requests from iOS, Android, Flutter, React Native, etc.