Base URL
The Jefftube API runs on:Authentication
The Jefftube API uses IP-based authentication with automatic user creation:- Users are automatically identified by their IP address
- Each IP address is hashed using SHA-256 with a salt for privacy
- A unique username (format:
@user-xxxxxx) is automatically generated - No registration or login required
IP Detection
The API checks the following headers in order:x-forwarded-for- First IP in the listx-real-ip- Direct IP header- Fallback to
127.0.0.1for local development
Rate Limiting
All API endpoints are protected by rate limiting:50 requests per minute per IP address
429 Too Many Requests response.
reCAPTCHA Protection
Certain write operations require reCAPTCHA verification to prevent abuse:- Creating comments
- Liking/unliking comments
- Liking/unliking videos
Implementation
For protected endpoints, include the reCAPTCHA token in the request header:In local development without
RECAPTCHA_SECRET_KEY configured, reCAPTCHA verification is skipped.Verification Threshold
reCAPTCHA v3 scores must be 0.5 or higher to pass verification.Error Handling
The API uses standard HTTP status codes:Request succeeded
Resource created successfully
Invalid request parameters or validation failed
reCAPTCHA verification failed or token missing
Resource or endpoint not found
Rate limit exceeded
Server error occurred
Response Format
Success Responses
Successful responses return JSON with the requested data:Error Responses
Error responses include anerror field with a descriptive message:
Data Types
UUIDs
User IDs, comment IDs, and like IDs are UUIDs (v4 format):Video IDs
Video IDs are string identifiers (up to 50 characters):Timestamps
All timestamps are in ISO 8601 format:Health Check
A health check endpoint is available outside the/api namespace: