Rediafile Cloud API v2

Complete developer & business integration guide. Upload, manage, and share files via REST API.

Base URLrediafile.com/cloud/api/v2/
FormatJSON / UTF-8
ProtocolHTTPS (recommended)
MethodPOST (unless noted)

📘 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.

Guaranteed compatibility — This API will evolve over time, but no current endpoint or response value will be modified. You can write your integration code with confidence.
1. Authenticate/authorize
2. Get Tokenaccess_token
3. Call APIwith token
4. JSON Responseprocess data

Base URL

https://rediafile.com/cloud/api/v2/

Technical requirements

AspectSpecification
EncodingUTF-8 required for all strings
ProtocolHTTPS strongly recommended (SSL required)
HTTP MethodPOST (unless otherwise noted)
Date formatY-m-d H:i:s (e.g. 2026-08-01 14:12:11)
Content-Typeapplication/x-www-form-urlencoded or multipart/form-data for uploads

🚀 Quick start

In 3 steps, make your first API call:

Step 1 Get your API keys

Log in to your Rediafile account → Account Settings → API Access. You will find Key 1 and Key 2 (64 characters each).

Step 2 Obtain an access_token
curl -X POST https://rediafile.com/cloud/api/v2/authorize \
  -d "username=your_username" \
  -d "password=your_password"
Step 3 Use the token
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.

Session — The same 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.

https://rediafile.com/cloud/api/v2/authorize

Parameters

ParameterTypeRequiredDescription
usernamestringYes*Account username
passwordstringYes*Account password
key1string (64)Yes*API Key 1 (from Account Settings)
key2string (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

MessageCause
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.

https://rediafile.com/cloud/api/v2/disable_access_token
ParameterTypeRequiredDescription
access_tokenstringYesToken to disable
account_idstringYesAccount ID

⚠️ HTTP error codes

Errors are returned via standard HTTP status codes. Additional details are included in the JSON response body.

CodeDescriptionRecommended action
400Bad input parameterCheck sent parameters
401Bad or expired tokenRe-authenticate via /authorize
404File not foundVerify file_id or short_url
405Method not expectedUse POST (or GET if specified)
429Rate limit reachedReduce request frequency
5xxServer errorRetry 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.

https://rediafile.com/cloud/api/v2/account/info
ParameterTypeRequiredDescription
access_tokenstringYesAccess token
account_idstringYesAccount 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.

https://rediafile.com/cloud/api/v2/account/package
ParameterTypeRequiredDescription
access_tokenstringYesAccess token
account_idstringYesAccount ID

Key response fields

FieldDescription
labelPlan name (e.g. "Premium Account")
max_upload_sizeMax upload size in bytes
can_upload1 = upload allowed, 0 = not
concurrent_uploadsMax concurrent uploads
max_remote_download_urlsMax remote URLs (50 default)
level_typeAccount type ("paid user", etc.)

📁 Files

POST /file/upload

File upload interface. Note: Chunked uploads are not yet supported.

https://rediafile.com/cloud/api/v2/file/upload
ParameterTypeRequiredDescription
access_tokenstringYesAccess token
account_idstringYesAccount ID
upload_filefileYesFile to upload (multipart/form-data)
folder_idstringNoTarget folder ID (root if empty)
Required Content-Type — For this endpoint, use 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.

https://rediafile.com/cloud/api/v2/file/download
ParameterTypeRequiredDescription
access_tokenstringYesAccess token
account_idstringYesAccount ID
file_idstringYes*Numeric file ID
short_urlstringYes*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.

https://rediafile.com/cloud/api/v2/file/url_upload_add
ParameterTypeRequiredDescription
access_tokenstringYesAccess token
account_idstringYesAccount ID
file_url_base64stringYesExternal URL encoded in base64
folder_idstringNoTarget 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.

https://rediafile.com/cloud/api/v2/file/url_upload_status
ParameterTypeRequiredDescription
access_tokenstringYesAccess token
account_idstringYesAccount ID
scheduled_item_idintYesID 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.

https://rediafile.com/cloud/api/v2/file/info
ParameterTypeRequiredDescription
access_tokenstringYesAccess token
account_idstringYesAccount ID
file_idstringYesFile ID

POST /file/edit

Modifies file metadata.

https://rediafile.com/cloud/api/v2/file/edit
ParameterTypeRequiredDescription
access_tokenstringYesAccess token
account_idstringYesAccount ID
file_idstringYesFile ID to modify
filenamestringNoNew name (empty = unchanged)
fileTypestringNoNew MIME type (e.g., application/octet-stream)
folder_idstringNoNew parent folder ID (empty = unchanged)

POST /file/delete

Deletes an active file (moves to trash).

https://rediafile.com/cloud/api/v2/file/delete
ParameterTypeRequiredDescription
access_tokenstringYesAccess token
account_idstringYesAccount ID
file_idstringYesFile ID to delete

POST /file/move

Moves a file to another folder.

https://rediafile.com/cloud/api/v2/file/move
ParameterTypeRequiredDescription
access_tokenstringYesAccess token
account_idstringYesAccount ID
file_idstringYesFile ID
new_parent_folder_idstringYesDestination folder ID

POST /file/copy

Copies a file to another folder.

https://rediafile.com/cloud/api/v2/file/copy
ParameterTypeRequiredDescription
access_tokenstringYesAccess token
account_idstringYesAccount ID
file_idstringYesSource file ID
copy_to_folder_idstringYesDestination 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.

https://rediafile.com/cloud/api/v2/folder/create
ParameterTypeRequiredDescription
access_tokenstringYesAccess token
account_idstringYesAccount ID
folder_namestringYesNew folder name
parent_idstringNoParent folder ID
is_publicintNo0=Private, 1=Unlisted, 2=Public (default: 0)
access_passwordstring (32)NoMD5 hash of password (32 chars)

POST /folder/listing

Returns the list of folders and files in a parent folder.

https://rediafile.com/cloud/api/v2/folder/listing
ParameterTypeRequiredDescription
access_tokenstringYesAccess token
account_idstringYesAccount ID
parent_folder_idstringNoParent 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.

https://rediafile.com/cloud/api/v2/folder/info
ParameterTypeRequiredDescription
access_tokenstringYesAccess token
account_idstringYesAccount ID
parent_folder_idstringNoFolder ID

POST /folder/edit

Modifies an existing folder.

https://rediafile.com/cloud/api/v2/folder/edit
ParameterTypeRequiredDescription
access_tokenstringYesAccess token
account_idstringYesAccount ID
folder_idstringYesFolder ID to modify
folder_namestringNoNew name
parent_idstringNoNew parent folder
is_publicintNo0=Private, 1=Unlisted, 2=Public
access_passwordstring (32)NoMD5 hash of password

POST /folder/delete

Deletes a folder.

https://rediafile.com/cloud/api/v2/folder/delete
ParameterTypeRequiredDescription
access_tokenstringYesAccess token
account_idstringYesAccount ID
folder_idstringYesFolder ID to delete

POST /folder/move

Moves a folder to another location.

https://rediafile.com/cloud/api/v2/folder/move
ParameterTypeRequiredDescription
access_tokenstringYesAccess token
account_idstringYesAccount ID
folder_idstringYesFolder ID to move
new_parent_folder_idstringYesDestination 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

Security Always use HTTPS

All requests must use HTTPS. Enforce SSL server-side to ensure token and data security.

Performance Reuse tokens

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.

Reliability Handle errors

Always check _status in the JSON response. On error ("error"), read the response field for the detailed message.

Encoding Base64 for URLs

For /file/url_upload_add, always encode the URL in base64 before sending. Use utf-8 for all text.

Limitation No chunked upload

Chunked uploads are not yet supported. For large files, use /file/url_upload_add or check max_upload_size via /account/package.

📊 Limits & Restrictions

AspectValue / Behavior
Token expiration1 hour of inactivity
Rate limitingHTTP 429 if limit reached
Upload chunksNot currently supported
Remote URL uploadMax 50 URLs (depending on plan)
EncodingUTF-8 required
API keysExactly 64 characters
Folder passwordMD5 hash, 32 characters
Business plans — Storage limits, upload size, and bandwidth depend on your plan. Check /account/package for your current restrictions.

❓ FAQ

How do I get my API keys?

Log in to your Rediafile account → Account Settings → API Access. You will see Key 1 and Key 2. Each key is exactly 64 characters.

Can I use username/password instead of API keys?

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.

My token expired, what should I do?

Call /authorize again to obtain a new access_token. Tokens expire after 1 hour of inactivity.

How do I upload to a specific folder?

Use the folder_id parameter in /file/upload. Get the folder ID via /folder/listing.

Is large file upload supported?

Chunked uploads are not yet available. Max size depends on your plan (see /account/packagemax_upload_size). For very large files, use /file/url_upload_add.

Can I integrate Rediafile into my mobile app?

Yes, the API is compatible with all platforms. Use standard HTTP POST requests from iOS, Android, Flutter, React Native, etc.