TrollflixDevelopers

Errors

Every error code the API returns, what it means and how to fix it.

When a request fails, the response carries a machine-readable error_message_code. Codes are stable: build your error handling on them, not on HTTP status codes or message text.

{ "success": false, "error_message_code": "content_caption_invalid_length" }

Some errors return extra fields that help you fix the request, for example max_schedule_days_ahead or limit_reset_time_unix. They are listed next to the code below.

Authentication

CodeHTTPMeaning and fix
api_key_missing401No Authorization: Bearer ... header. Add it.
api_key_invalid401The key is malformed, rotated or deleted. Copy the current key from Settings → Integrations, or rotate to get a new one.

API key management

Returned by the API key endpoints.

CodeMeaning and fix
api_key_already_existsYou already have a key. Rotate it to get a new one.
api_key_not_foundYou have no key to rotate or delete. Create one first.
user_authentication_failedNot signed in, or the session expired. Returned in the general_error field. Sign in to Trollflix again.

Account

CodeMeaning and fix
user_is_banned_from_uploading_contentYour account may not upload right now. Check your notifications on Trollflix.
user_not_foundThe account that owns the key no longer exists. Returned in the error field with HTTP 404.

Video file

CodeMeaning and fix
file_not_foundNo video arrived. Send it as a multipart field named file. A body larger than the server accepts also ends up here.
content_file_invalid_formatNot a supported video format. Use MP4, MOV, MKV, AVI, FLV, WMV, M4V or MPEG.
content_video_duration_invalidThe video is shorter than 2 seconds, longer than 120 seconds, or unreadable.

Text and category

CodeMeaning and fix
content_caption_invalid_lengthcaption is longer than 5,000 characters.
content_ai_summary_invalid_lengthai_summary_of_content is longer than 5,000 characters. It is rejected, not cut, so shorten it and retry.
content_category_invalidsuper_category_id is not an active main category. Fetch the current list, see Categories.

Thumbnail

CodeMeaning and fix
thumbnail_file_invalid_formatUse a JPG, PNG, WEBP, GIF, BMP or TIFF image.
thumbnail_file_invalid_dimensionsThe image is smaller than 500×300 px. Also returns thumbnail_width_provided and thumbnail_height_provided.
thumbnail_file_too_largeThe image is over 5 MB.
thumbnail_file_errorThe image could not be saved. Retry.

Scheduling

CodeMeaning and fix
scheduled_publish_time_invalidscheduled_publish_at is not a number or is not in the future.
scheduled_publish_time_too_farToo far ahead. Also returns max_schedule_days_ahead.
scheduled_content_day_slot_fullYou already scheduled the maximum for that day (UTC). Also returns max_scheduled_per_day. Pick another day.

Limits

CodeMeaning and fix
content_upload_limit_failureDaily limit for immediate uploads reached. Also returns limit_reset_time_unix and limit_amount.
scheduled_content_upload_limit_failureDaily limit for scheduling uploads reached. Same extra fields.

See Rate limits.

Server

CodeMeaning and fix
file_upload_failedThe video could not be stored. Retry later with the same upload_token.
content_upload_failedThe meme could not be created. Retry later with the same upload_token.
media_container_upload_failedThe meme could not be created. Retry later with the same upload_token.

If a server error keeps happening, contact us with the time of the request and the error_message_code.