The Rediafile Cloud API v2 is a REST interface that lets developers integrate file storage, sharing, and folder management directly into their applications. It supports uploads up to 10 GB, temporary sharing links, and secure token-based authentication.
This guide covers every endpoint with cURL, PHP, Python, and JavaScript examples, plus production guidance for error handling, rate limits, and security.
https://rediafile.com/cloud/api/v2/authorize with your credentials or API keys.Authorization: Bearer <token> to every request.POST https://rediafile.com/cloud/api/v2/authorize
Obtain a Bearer access token using account credentials or API keys.
curl -X POST https://rediafile.com/cloud/api/v2/authorize \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin" \
-d "password=secret123"POST https://rediafile.com/cloud/api/v2/disable_access_token
Revoke and invalidate a previously issued access token.
curl -X POST https://rediafile.com/cloud/api/v2/disable_access_token \
-H "Authorization: Bearer $TOKEN" \
-d "access_token=eyJhbGciOi..."| Code | Title | Description |
|---|---|---|
200 | OK | The request succeeded. |
400 | Bad Request | The request was malformed or missing required parameters. |
401 | Unauthorized | Authentication failed or the token is invalid/expired. |
403 | Forbidden | The account lacks permission for this resource. |
404 | Not Found | The requested file or folder was not found. |
429 | Too Many Requests | Rate limit exceeded. Retry after the indicated delay. |
GET https://rediafile.com/cloud/api/v2/account/info
Retrieve detailed information about the authenticated account.
curl https://rediafile.com/cloud/api/v2/account/info \
-H "Authorization: Bearer $TOKEN"GET https://rediafile.com/cloud/api/v2/account/package
Retrieve the current subscription package and quota details.
curl https://rediafile.com/cloud/api/v2/account/package \
-H "Authorization: Bearer $TOKEN"POST https://rediafile.com/cloud/api/v2/file/upload
Upload a file (up to 10 GB) via multipart/form-data. Returns a short URL.
curl -X POST https://rediafile.com/cloud/api/v2/file/upload \
-H "Authorization: Bearer $TOKEN" \
-F "file=@document.pdf"POST https://rediafile.com/cloud/api/v2/file/url_upload_add
Queue a file for upload from a remote URL (server-to-server fetch).
curl -X POST https://rediafile.com/cloud/api/v2/file/url_upload_add \
-H "Authorization: Bearer $TOKEN" \
-d "url=https://example.com/large-file.zip"GET https://rediafile.com/cloud/api/v2/file/url_upload_status
Check the progress of a queued remote URL upload task.
curl "https://rediafile.com/cloud/api/v2/file/url_upload_status?task_id=task_4821" \
-H "Authorization: Bearer $TOKEN"GET https://rediafile.com/cloud/api/v2/file/download
Get a signed temporary download URL for a file via its short URL.
curl "https://rediafile.com/cloud/api/v2/file/download?short_url=2Vv" \
-H "Authorization: Bearer $TOKEN"GET https://rediafile.com/cloud/api/v2/file/info
Retrieve metadata for a specific file.
curl "https://rediafile.com/cloud/api/v2/file/info?file_id=file_84729" \
-H "Authorization: Bearer $TOKEN"POST https://rediafile.com/cloud/api/v2/file/edit
Update file metadata (name, password, expiry).
curl -X POST https://rediafile.com/cloud/api/v2/file/edit \
-H "Authorization: Bearer $TOKEN" \
-d "file_id=file_84729" \
-d "name=renamed.pdf"POST https://rediafile.com/cloud/api/v2/file/delete
Permanently delete a file.
curl -X POST https://rediafile.com/cloud/api/v2/file/delete \
-H "Authorization: Bearer $TOKEN" \
-d "file_id=file_84729"POST https://rediafile.com/cloud/api/v2/file/move
Move a file to a different folder.
curl -X POST https://rediafile.com/cloud/api/v2/file/move \
-H "Authorization: Bearer $TOKEN" \
-d "file_id=file_84729" \
-d "folder_id=fld_123"POST https://rediafile.com/cloud/api/v2/file/copy
Create a copy of a file in a specified folder.
curl -X POST https://rediafile.com/cloud/api/v2/file/copy \
-H "Authorization: Bearer $TOKEN" \
-d "file_id=file_84729" \
-d "folder_id=fld_456"POST https://rediafile.com/cloud/api/v2/folder/create
Create a new folder, optionally password-protected.
curl -X POST https://rediafile.com/cloud/api/v2/folder/create \
-H "Authorization: Bearer $TOKEN" \
-d "folder_name=My New Folder"GET https://rediafile.com/cloud/api/v2/folder/listing
List files and subfolders inside a folder.
curl "https://rediafile.com/cloud/api/v2/folder/listing?folder_id=fld_root" \
-H "Authorization: Bearer $TOKEN"GET https://rediafile.com/cloud/api/v2/folder/info
Retrieve metadata for a specific folder.
curl "https://rediafile.com/cloud/api/v2/folder/info?folder_id=fld_123" \
-H "Authorization: Bearer $TOKEN"<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/authorize');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
'username' => 'admin',
'password' => 'secret123',
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);<?php
$ch = curl_init('https://rediafile.com/cloud/api/v2/file/upload');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
'file' => new CURLFile('/path/to/document.pdf'),
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);import requests
resp = requests.post('https://rediafile.com/cloud/api/v2/authorize', data={
'username': 'admin',
'password': 'secret123',
})
print(resp.json())const form = new FormData();
form.append('file', fileInput.files[0]);
const res = await fetch('https://rediafile.com/cloud/api/v2/file/upload', {
method: 'POST',
headers: { 'Authorization': `Bearer ${token}` },
body: form,
});| Resource | Limit |
|---|---|
| Requests per minute | 100 |
| Maximum file size | 10 GB (Pro plan) |
| Token expiry | 24 hours |
| Sharing link duration | 1 hour (default) |