Quickstart: list and download files with the DiskWala and TeraBox APIs
APIPANEL.IN developer guide · Updated November 2026
This guide takes you from a new account to a downloaded file with the DiskWala API or the TeraBox API. The two are separate products with separate tokens, plans and base URLs. The request is the same for both, but the response fields differ, and this guide shows both.
Before you start
- Create an APIPANEL.IN account and start a trial or buy a plan for the service you need. Each plan gives a fixed number of requests for a fixed period.
- Copy your token from the dashboard (under Subscription Status). It looks like
token_id.secret; the authentication guide explains the format. - Have a sharing link to a file you own or are allowed to download. The API does not check copyright for you; using it only for files you have the rights to is your responsibility under the Terms of Service and the file host's own terms.
| Service | Base URL | Sharing link example |
|---|---|---|
| DiskWala API | https://disk-api.apipanel.in | https://www.diskwala.com/sharing/link?surl=xxxxx |
| TeraBox API | https://tera-apiv2.teraboxapi.in | https://www.terabox.com/sharing/link?surl=xxxxx |
Step 1: list the files in a sharing link
Every integration starts with one request: GET /?url=<sharing link> with your token in the Authorization header. Send the sharing link URL-encoded in the url query parameter; cURL's --data-urlencode and the HTTP libraries below do that for you.
curl -G "https://disk-api.apipanel.in/" \
--data-urlencode "url=https://www.diskwala.com/sharing/link?surl=xxxxx" \
-H "Authorization: Bearer $DISKWALA_TOKEN"
A successful call returns 200 and a JSON array with one object per file. This call is the one that counts against your plan's request limit.
[
{
"file_name": "video",
"file_type": "video/mp4",
"extension": "mp4",
"size": "1024 MB",
"sizebytes": 1073741824,
"link": "https://www.diskwala.com/sharing/link?surl=xxxxx",
"download_url": "https://.../dl?...",
"stream_url": "https://.../stream?...",
"thumb_url": "https://.../thumb?..."
}
]
[
{
"file_name": "video.mp4",
"size": "1024 MB",
"sizebytes": 1073741824,
"link": "https://...",
"direct_link": "https://...",
"stream_url": "https://...",
"m3u8_url": "https://.../stream?file_id=...",
"thumb": "https://...",
"quality": "720"
}
]
| Purpose | DiskWala API | TeraBox API |
|---|---|---|
| Download the file | download_url | direct_link |
| Play in a browser or player | stream_url | stream_url |
| HLS playlist (M3U8) | not returned | m3u8_url (videos, may be null) |
| Thumbnail | thumb_url (may be null) | thumb |
| File type | file_type (MIME), extension | from file_name |
| Size | size (for display) and sizebytes (exact) | |
| Original sharing link | link | |
| Video quality | not returned | quality (may be null) |
A share can hold more than one file, so loop over the array instead of reading only the first element. Treat fields marked "may be null" as optional.
Step 2: make the request from your backend
Call the API from your server, never from a browser or a mobile app, so the token stays private. In Python with requests:
import os
import requests
BASE = "https://disk-api.apipanel.in"
TOKEN = os.environ["DISKWALA_TOKEN"] # never hard-code the token
r = requests.get(
BASE + "/",
params={"url": "https://www.diskwala.com/sharing/link?surl=xxxxx"},
headers={"Authorization": f"Bearer {TOKEN}"},
timeout=60,
)
r.raise_for_status()
files = r.json()
for f in files:
print(f["file_name"], f["size"])
The same request in Node.js 18 or later, which has fetch built in:
const BASE = "https://disk-api.apipanel.in";
const params = new URLSearchParams({ url: "https://www.diskwala.com/sharing/link?surl=xxxxx" });
const res = await fetch(`${BASE}/?${params}`, {
headers: { Authorization: `Bearer ${process.env.DISKWALA_TOKEN}` },
});
if (!res.ok) throw new Error(`DiskWala API ${res.status}: ${await res.text()}`);
for (const f of await res.json()) console.log(f.file_name, f.size);
Step 3: download a file
The download link in the response is pre-signed: it carries its own time-limited signature, so you fetch it with a plain GET and no Authorization header. Do not send your API token to the hosts in these links; they do not need it. Files can be large, so write the body to disk in chunks:
import re
f = files[0]
url = f.get("download_url") or f.get("direct_link") # DiskWala or TeraBox
name = re.sub(r'[\\/:*?"<>|]+', "_", f["file_name"]).strip(". ") or "download"
with requests.get(url, stream=True, timeout=(10, 120)) as r: # no token here
r.raise_for_status()
with open(name, "wb") as out:
for chunk in r.iter_content(chunk_size=1024 * 1024):
out.write(chunk)
Two details matter in production:
- Links expire. Use them soon after listing. When one has expired you get an error (TeraBox answers
410); list the sharing link again for fresh links. That new listing counts as a request. - Clean the file name. The example replaces path separators and characters that file systems reject, so a name such as
../xcannot write outside your download folder.
If your plan includes a bandwidth allowance, the dashboard shows how much is used and how much remains.
Step 4: stream a video
stream_url plays the video directly in a browser <video> element or a media player, without a token. For the TeraBox API, m3u8_url is an HLS playlist for players that support HLS (Safari natively, other browsers through a library such as hls.js). Both expire like the download links.
Check that the API is up
GET /health reports whether the service API is running. Use it for monitoring, not before every request: it tells you nothing about your token or plan.
Next steps
- Read Handling errors and plan limits before going to production. It covers which failures to retry and which not to.
- Try the listing call without writing code in the API Playground.
- Compare plans on the DiskWala API pricing and TeraBox API pricing pages.