Skip to content

Latest commit

 

History

History
90 lines (64 loc) · 2.55 KB

File metadata and controls

90 lines (64 loc) · 2.55 KB

TeraBox API Documentation

This API provides a powerful interface for processing TeraBox sharing links, offering streaming and download capabilities with automated cookie management and failure notifications.

Base URL

https://e843ce9d-bcdb-4006-867b-8422ad0ccf60-00-2u7rgvvwak9pu.sisko.replit.dev


1. Process TeraBox Link

Extracts file information and generates proxy URLs for streaming and downloading.

Endpoint: GET /api/process

Parameters:

Parameter Type Required Description
url string Yes The TeraBox sharing URL (e.g., https://terabox.com/s/...)

Example Request: GET /api/process?url=https://terabox.com/s/1YfLbHZe48X6QT3FQ8in7Xw

Successful Response:

{
  "proxy_stream_url": "/stream/409aead2c948e56b21baff1b94a16602.m3u8",
  "proxy_download_url": "/download/409aead2c948e56b21baff1b94a16602",
  "cookie_used": "1"
}

2. Cookie Management API

Manage the rotating cookie pool used for processing requests.

A. Add or Update Cookie

Endpoint: GET /api/cookies

Parameters:

Parameter Type Required Description
cookies string Yes The raw cookie string from TeraBox
number string No Custom ID for the cookie (e.g., 1). Defaults to timestamp.
host string No TeraBox host. Defaults to dm.terabox.app.

Example: GET /api/cookies?number=1&cookies=browserid=...

B. List All Cookies

Endpoint: GET /api/cookies

Example: GET /api/cookies

C. Delete Cookie

Endpoint: GET /api/cookies

Parameters:

Parameter Type Required Description
delete string Yes The ID of the cookie to remove

Example: GET /api/cookies?delete=1


3. Proxy Endpoints

These endpoints handle the actual data transfer from TeraBox.

  • Streaming: GET /stream/{id}.m3u8
  • Video Segments: GET /segment/{id}.ts
  • Direct Download: GET /download/{id}

4. Failure Notifications

If a cookie fails to generate a link (invalid or restricted), the system automatically notifies your regeneration endpoint:

Method: GET URL: https://b0da308e-dea2-4f7f-9716-e42f05617138-00-3v7r6qc4904uz.sisko.replit.dev:8000//regenerate?number={id}


Technical Features

  • Rotating Pool: Requests are balanced across all available cookies.
  • Async Processing: Fast link extraction.
  • Hashed IDs: Real TeraBox file IDs are masked for security.
  • Cache: Responses are cached for 12 hours to improve performance.