Skip to content
APIPANEL.IN

Handling errors and plan limits in the DiskWala and TeraBox APIs

APIPANEL.IN developer guide · Updated November 2026

A production integration spends most of its error-handling code on a few cases: a bad token, an exhausted plan, a link that has no files and a temporary network failure. Each needs a different reaction, and retrying the wrong one wastes requests. This guide describes how the DiskWala API and the TeraBox API report each case.

How errors look

Successful calls return 200. Errors return a 4xx or 5xx status and, in most cases, a JSON body with a detail field describing the problem:

Example error
HTTP/1.1 429 Too Many Requests
Content-Type: application/json

{"detail": "API call limit exceeded"}

Decide what to do mainly from the status code, and log the detail text. The one case where the text matters is 429 on the TeraBox API (see below).

Status codes and what to do

StatusMeaningRetry?
400The link is not one the service accepts, is broken, or has no files ("Invalid resource provided", "Invalid or unsupported URL domain", "Broken link or no files").No. Check the link.
401Missing or invalid token.No. Check the header and token.
403Invalid token for this service, subscription expired or, on TeraBox, account suspended.No. Check the token or renew the plan.
404DiskWala API: "No downloadable files found for this link".No.
410A returned download or stream link has expired.List the sharing link again for fresh links.
429"API call limit exceeded": your plan's request limit is used up. TeraBox API only: "Rate limit exceeded, slow down" means too many requests in a short time.Plan limit: no, renew or upgrade. Rate limit: yes, after a pause.
5xxA temporary problem in the API or with the file host (including 503 "try again").Yes, a few times with back-off.

Request limits, bandwidth and plan periods

Each plan is a one-time payment that gives a fixed number of API requests for a fixed number of days. It does not renew automatically, so you are never charged again without buying a new plan. Some plans also include a bandwidth allowance for downloads. Three things follow from that:

The dashboard shows remaining requests, bandwidth and the plan's end date for each service.

Retrying safely

Retry only what can succeed on a second try: network errors, timeouts, 5xx responses and the TeraBox rate-limit 429. Use exponential back-off with a cap so a short outage does not turn into a burst of requests.

Python · retry with back-off
import random
import time

import requests

RETRYABLE = {500, 502, 503, 504}


def call(session, url, params, attempts=4):
    for i in range(attempts):
        try:
            r = session.get(url, params=params, timeout=60)
        except (requests.ConnectionError, requests.Timeout):
            r = None
        slow_down = r is not None and r.status_code == 429 and "slow down" in r.text
        if r is not None and r.status_code not in RETRYABLE and not slow_down:
            return r  # success, or an error that a retry will not fix
        if i == attempts - 1:
            break
        time.sleep(min(30, 2 ** i) + random.random())  # 1s, 2s, 4s ... plus jitter
    raise RuntimeError("API unavailable, try again later")

Then branch on the final status:

Python · handle the result
r = call(session, BASE + "/", {"url": link})
if r.status_code == 200:
    files = r.json()
elif r.status_code in (400, 404):
    raise RuntimeError(f"Link problem: {r.text[:200]}")
elif r.status_code in (401, 403):
    raise RuntimeError("Token or plan problem: check the dashboard")
elif r.status_code == 429:
    raise RuntimeError("Request limit reached: renew or upgrade the plan")
else:
    raise RuntimeError(f"Request failed ({r.status_code}): {r.text[:200]}")

Timeouts and large files

Avoid spending requests you do not need

Still stuck? The API Playground shows the full request and response, which is usually the fastest way to see what is wrong. Signed-in customers can also open a support ticket from the dashboard.