v2 API

Rediafile Cloud API — Complete Developer Guide

Reference, Recipes & Best Practices for the v2 REST API
Generated August 26, 2026

Table of Contents

  1. Overview
  2. Quick Start
  3. Authentication
  4. Disabling Access Tokens
  5. HTTP Error Codes
  6. Account Endpoints
  7. File Upload
  8. Remote URL Upload
  9. File Management
  10. Folder Endpoints
  11. Folder Management
  12. Code Examples — PHP
  13. Code Examples — Python & JavaScript
  14. Best Practices
  15. Rate Limits & File Size Limits
  16. FAQ

Overview

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.

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

Quick Start

  1. Get a token — call /authorize with your credentials or API keys.
  2. Include the token — add Authorization: Bearer <token> to every request.
  3. Make calls — upload, download, and manage your files and folders.

Authentication

Authorize

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"

Disabling Access Tokens

Disable Access Token

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

HTTP Error Codes

CodeTitleDescription
200OKThe request succeeded.
400Bad RequestThe request was malformed or missing required parameters.
401UnauthorizedAuthentication failed or the token is invalid/expired.
403ForbiddenThe account lacks permission for this resource.
404Not FoundThe requested file or folder was not found.
429Too Many RequestsRate limit exceeded. Retry after the indicated delay.

Account Endpoints

Account Info

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"

Account Package

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"

File Upload

Upload File

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"

Remote URL Upload

Remote URL Upload

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"

URL Upload Status

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"

File Management

Download File

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"

File Info

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"

Edit File

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"

Delete File

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"

Move File

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"

Copy File

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"

Folder Endpoints

Create Folder

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"

List 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"

Folder Management

Folder Info

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"

Code Examples — PHP

Authorize

<?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);

File Upload

<?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);

Code Examples — Python & JavaScript

Python — Authorize

import requests

resp = requests.post('https://rediafile.com/cloud/api/v2/authorize', data={
    'username': 'admin',
    'password': 'secret123',
})
print(resp.json())

JavaScript — File Upload

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,
});

Best Practices

Rate Limits & File Size Limits

ResourceLimit
Requests per minute100
Maximum file size10 GB (Pro plan)
Token expiry24 hours
Sharing link duration1 hour (default)

FAQ

How do I get a token?
Call the /authorize endpoint with your username and password, or your API keys.
Do tokens expire?
Yes, after 24 hours. Call /authorize again to get a fresh one.
Can I upload a file from a URL?
Yes, use /file/url_upload_add and then poll /file/url_upload_status.
What is the maximum file size?
10 GB on the Pro plan.