Overview
Base URL, request format and response conventions shared by every endpoint.
Base URLs
Uploads go to the dedicated upload host, which accepts large request bodies and long transfers:
https://uploads.backend.trollflix.com/api/phpEverything else uses the main API host:
https://backend.trollflix.com/api/phpAuthentication
Send your key as Authorization: Bearer tfx_.... See
Authentication. The API key endpoints
are the exception: they use your signed-in Trollflix session instead.
Requests
- Endpoints that take files use
multipart/form-data. - Booleans are the strings
"1"(true) and"0"(false). - Timestamps are Unix time in seconds, UTC.
- Unknown fields are ignored.
Responses
Every response is JSON. Check the success field, not only the HTTP status:
authentication failures use 401, but validation errors (a video that is too
long, a full schedule) come back as 200 with an error_message_code.
{
"success": true,
"message_code": "content_upload_success",
"content_id": 18301
}{
"success": false,
"error_message_code": "content_video_duration_invalid"
}A few validation errors are returned without a success field at all (only
error_message_code). Treat anything other than success: true as a
failure.
Every error_message_code is listed in Errors.
Endpoints
| Method | Path | Description |
|---|---|---|
POST | /developer/upload_video | Upload a video to your channel |
POST | /user_settings/get_api_key | Retrieve your API key's details |
POST | /user_settings/create_api_key | Create your API key |
POST | /user_settings/rotate_api_key | Replace your API key |
POST | /user_settings/delete_api_key | Delete your API key |