TeraBox API Gateway

API Status

API Server: Running
Database: Connected
Authentication: Active

Last checked: -

API Information

Version

3.0

Status

Operational

Access Information

User Access

Subscriptions control access. Administrators provision user accounts and API keys.

  1. Purchase a subscription (contact sales or use the checkout provided by the administrator).
  2. Receive credentials from the administrator (username, password, and API key).
  3. Login to your dashboard and start making API requests.

Quick actions

Plans (example)

  • Basic: 300 requests/month – 49 INR / 2 USD
  • Pro: 3,000 requests/month – 99 INR / 2 USD
  • Enterprise: 30,000 requests/month – 149 INR / 10 USD

API Endpoints

🔐 Authentication Required

All API endpoints require authentication. Use JWT tokens or API keys.

Authentication Endpoints

POST /auth/login

Login to get JWT token

Body: {"username": "your_username", "password": "your_password"}
Response: Returns JWT token in cookie + JSON with user info
Example: curl -X POST https://6ab25a82-ff2e-46c2-87f7-527275574e3a.glacierhosting.org/auth/login -H "Content-Type: application/json" -d '{"username":"user","password":"pass"}'
GET /auth/me

Get current user info and usage stats

Auth: JWT token required
Response: User profile + daily/monthly usage statistics
Example: curl https://6ab25a82-ff2e-46c2-87f7-527275574e3a.glacierhosting.org/auth/me -H "Authorization: Bearer YOUR_JWT_TOKEN"

📁 File Access Endpoints

GET /api?url=...

Get file information from TeraBox links

Parameters:
url (required): TeraBox share link
pwd (optional): Password for protected links
Response: File list with metadata (name, size, type)
Example: curl "https://6ab25a82-ff2e-46c2-87f7-527275574e3a.glacierhosting.org/api?url=https://terabox.com/s/1ABC123..." -H "Authorization: Bearer YOUR_TOKEN"
GET /api2?url=...

Get files with direct download links

Parameters:
url (required): TeraBox share link
pwd (optional): Password for protected links
Response: File list with direct download URLs
Note: Provides actual download links (recommended for downloads)
Example: curl "https://6ab25a82-ff2e-46c2-87f7-527275574e3a.glacierhosting.org/api2?url=https://terabox.com/s/1ABC123..." -H "Authorization: Bearer YOUR_TOKEN"
GET /api?mode=resolve&surl=...

Advanced: Auto-resolve with jsToken

Parameters:
mode=resolve: Auto-extract jsToken and fetch API
surl (required): Short URL ID from share link
Best for: Most use cases - automatic token handling
Example: curl "https://6ab25a82-ff2e-46c2-87f7-527275574e3a.glacierhosting.org/api?mode=resolve&surl=1ABC123" -H "Authorization: Bearer YOUR_TOKEN"
GET /api?mode=stream&surl=...

Streaming: Get HLS playlist for video playback

Parameters:
mode=stream: Generate streaming playlist
surl (required): Short URL ID
type (optional): Quality (M3U8_AUTO_360, M3U8_AUTO_480, etc.)
Use for: Video streaming in media players
Example: curl "https://6ab25a82-ff2e-46c2-87f7-527275574e3a.glacierhosting.org/api?mode=stream&surl=1ABC123&type=M3U8_AUTO_360" -H "Authorization: Bearer YOUR_TOKEN"

📊 Public Endpoints (No Auth Required)

GET /health

Check API health status

Response: {"status": "healthy", "timestamp": "ISO_DATE"}
Example: curl https://6ab25a82-ff2e-46c2-87f7-527275574e3a.glacierhosting.org/health
GET /api/public-stats

View public system statistics

Response: Total users, active users, requests today
Example: curl https://6ab25a82-ff2e-46c2-87f7-527275574e3a.glacierhosting.org/api/public-stats
GET /api-info

Get API information and available endpoints

Response: Complete API documentation in JSON
Example: curl https://6ab25a82-ff2e-46c2-87f7-527275574e3a.glacierhosting.org/api-info

⚙️ Usage & Limits

Rate Limits: Applied per user account
Default Limits: 3,000 requests/month
Check Usage: Use GET /auth/me to see current usage
Admin Override: Admins can adjust user limits
Error 429: Usage limit exceeded - wait or contact admin

🔧 Authentication Methods

Method 1 - JWT Header: Authorization: Bearer YOUR_JWT_TOKEN
Method 2 - API Key Header: X-API-Key: YOUR_API_KEY
Method 3 - Query Parameter: ?api_key=YOUR_API_KEY
Get API Key: Login and check your dashboard or use /auth/me

🚨 Error Codes

200: Success
400: Bad request (invalid parameters)
401: Authentication required/not valid
403: Admin access required
429: Usage limit exceeded
500: Server error

📝 Important Notes:

  • All file access endpoints require authentication
  • Contact administrator after subscription to receive login credentials
  • Use /api2 for downloads, /api for file information
  • Advanced modes (mode=resolve, mode=stream) provide better performance
  • Check your usage limits with GET /auth/me
  • Protected links require pwd parameter

System Statistics

-

Registered Users

-

Active Today

-

Requests Today