API tokens and authentication for the DiskWala and TeraBox APIs
APIPANEL.IN developer guide · Updated November 2026
The call that lists a sharing link (GET /?url=…) on the DiskWala API and the TeraBox API must carry your token. The token identifies your account and your plan for that service. The download, stream and thumbnail links that call returns are pre-signed and expire, so they need no token. This guide explains what the token is, how to send it, and how to keep it safe.
One token per service
APIPANEL.IN is one account with two independent services. When you activate the DiskWala API you get a DiskWala token; when you activate the TeraBox API you get a TeraBox token. They are not interchangeable:
- A DiskWala token sent to the TeraBox API (or the other way round) is rejected as invalid.
- Each token counts requests only against its own service's plan. Using TeraBox never uses up DiskWala requests.
- Each service has its own base URL:
https://disk-api.apipanel.infor DiskWala andhttps://tera-apiv2.teraboxapi.infor TeraBox.
If your application uses both services, store the two tokens in two separate settings, for example DISKWALA_TOKEN and TERABOX_TOKEN, and keep a small mapping from service to base URL and token.
The split-token format
Tokens look like a1b2c3d4.8f9e7d6c-5b4a-3c2d-1e0f-9a8b7c6d5e4f. The part before the dot is the token ID; the part after it is the secret. The API finds your token by its ID and then checks the secret against a stored hash. The secret itself is not kept in readable form, which is why the dashboard shows the full token only to you and why support staff will never ask for it.
Treat the whole string as one opaque value: send it exactly as shown, including the dot.
Sending the token
Put the token in the Authorization header using the Bearer scheme. That is the only supported way; do not put it in the URL, where it would end up in server logs, browser history and proxies.
Authorization: Bearer <your_token>
import os
import requests
session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['TERABOX_TOKEN']}"
r = session.get("https://tera-apiv2.teraboxapi.in/", params={"url": "https://www.terabox.com/sharing/link?surl=xxxxx"}, timeout=60)
Keep the token on your server
Anyone who has your token can spend your plan's requests and bandwidth. The single most important rule is that the token must never reach a client you do not control:
- No tokens in front-end code. JavaScript in a web page, a mobile app bundle or a desktop app can be read by its users. Call the API from your backend and send your users only the results they need.
- No tokens in source control. Load the token from an environment variable or a secret manager. If a token was ever committed, rotate it, even if the repository is private.
- No tokens in logs. If you log outgoing requests, remove the
Authorizationheader first. - No tokens on returned links. Fetch
download_url,direct_link,stream_urland similar links without the header. They are served from other hosts and do not need it. If you use one HTTP session for everything, make sure it does not add the header to those requests. - Bots count too. A Telegram or Discord bot that calls the API should keep the token in its server configuration, never in a message, a command or a public repository.
Rotating a token
If you think a token has leaked, rotate it from your dashboard. The old token stops working, so update your server's configuration straight away. Your plan, remaining requests and history stay with your account; only the credential changes.
A simple routine is to keep the token in one place (an environment variable read at start-up), rotate it, update that one value and restart your service.
When authentication fails
Authentication problems come back as 401 or 403 with a JSON body that has a detail message, for example {"detail": "Invalid token"}. The usual causes:
| Response | Likely cause |
|---|---|
401 | No Authorization header, or not in the form Bearer <token>. |
401 / 403 invalid token | A typo, a token from the other service, or a token that was rotated. |
403 subscription expired | The token is valid but the plan period has ended. Buy a new plan for that service. |
403 account suspended | TeraBox API only: the account was suspended. Contact support. |
The errors and limits guide covers every status code and which ones are safe to retry.