Skip to content
Developers

    Errors

    Markdown
    The tiktornado API error shape, every reason it can answer with its HTTP status and cause, and the reasons a failed post or reply can carry.

    The error shape

    Every error, on every route, has the same body:

    {
      "error": {
        "reason": "schedule_too_soon",
        "message": "Pick a time at least 10 minutes from now."
      }
    }
    • reason is a stable code. Write your program against it.
    • message is a plain sentence you can show to a person. Its wording may change, so don't match on it.

    Treat a reason you don't know as a general failure of that request: new reasons may be added. The API reference lists the reasons each route can answer.

    Statuses

    StatusMeaning
    400The request can't be done as sent. The reason says why
    401The API key is missing, malformed or revoked
    403The key lacks the scope, or the subscription isn't active
    404The route, or the thing it names, doesn't exist or isn't yours
    409A request with the same Idempotency-Key is still running
    422The Idempotency-Key was already used for a different request
    429Too many requests. Wait the seconds in Retry-After
    500Something went wrong on our side
    503The service, or TikTok behind it, is briefly unavailable

    A 400 or 404 answer to a change is stored under its Idempotency-Key, so retrying with the same key gives the same refusal: fix the request and send it with a new key. A 429, 500 or 503 is never stored, so a retry with the same key runs again. See Safe retries.

    Every reason

    Key and access

    ReasonStatusWhen
    api_key_invalid401No Authorization: Bearer header, a key in the wrong format, or a key that doesn't exist or was revoked. The answer carries WWW-Authenticate: Bearer realm="tiktornado"
    api_scope_missing403The key doesn't have the scope this route needs. See Scopes
    access_locked403The subscription that bills this account isn't active, or your whole tiktornado account is locked. Fix it under Billing in the app
    not_found404The route doesn't exist, or the account, post, comment or upload it names doesn't exist or isn't yours

    The request itself

    ReasonStatusWhen
    invalid_request400The body isn't a JSON object, is over 64 KB, has a field the route doesn't list, misses a required field, has a field of the wrong type or null where null isn't taken. Also: a query parameter that isn't valid (kind, limit, cursor, country, query, from, to), a new post with none or more than one of scheduledFor, postNow: true and queue: true, an edit with no field, a video post with more than one media item, or the same media item twice
    idempotency_key_required400A change was sent without an Idempotency-Key header, or with one that isn't 1 to 255 visible ASCII characters
    idempotency_in_progress409A request with this Idempotency-Key is still running. Wait a moment and try again
    idempotency_key_reused422This Idempotency-Key was already used with a different method, path or body. Use a new key for a new change

    Accounts

    ReasonStatusWhen
    account_not_ready400The account isn't set up to post yet, or TikTok is reviewing a ban on it (appealing_ban). The message says which
    invalid_state400The account is banned or inactive. On a post: it isn't in a state that allows this, for example cancelling a post that already failed, or editing one that was cancelled
    account_reconnecting400The account is being reconnected to TikTok, so its post options, music and places can't be read right now. Posts to it are still taken

    Media and captions

    ReasonStatusWhen
    media_required400mediaRefs is empty
    too_many_photos400More than 35 photos
    mixed_media400A video in a photo post, or a photo in a video post
    file_type_not_supported400Not MP4, MOV or WebM for a video, or JPEG, PNG or WebP for a photo or a cover image
    file_too_large400A video over 4 GB
    photo_too_large400A photo or a cover image over 20 MB
    file_damaged400The file can't be read as a video or a photo. Export it again
    link_not_allowed400A media link or cover link that isn't https, has a login in it, uses an IP address or a local host name, or can't be used for another reason
    link_unreachable400We couldn't open the link. It must be public and point straight at the file
    upload_expired400The upload behind this mediaRef has expired. Upload the file again
    caption_too_long400Over 2,200 characters for a video or 4,000 for photos, counted in UTF-16 code units, so some emoji count as 2

    Time

    ReasonStatusWhen
    schedule_too_soon400scheduledFor is 10 minutes or less from now: a time must be more than 10 minutes ahead. Editing a failed post whose time has passed needs a new scheduledFor too
    past_account_end400The time is after the account ends
    daily_limit_reached400One more post of this kind would put more than 15 videos, or 15 photo posts, on the account in some 24 hours
    post_locked400The post goes out in 10 minutes or less, or was sent with postNow, so it can't be changed or cancelled
    post_already_published400The post is publishing or already live

    Post settings

    ReasonStatusWhen
    drafts_no_settings400A post with toDrafts: true carries settings. Add them in the TikTok app instead
    ai_label_photo400aiGenerated: true on a photo post
    setting_videos_only400A video-only setting on a photo post, for example allowDuets, a cover frame or a track's volume
    setting_photos_only400A photo-only setting on a video post: autoMusic, coverPhotoIndex, or a privacy other than everyone
    music_conflict400Both music and autoMusic: true
    auto_music_branded400autoMusic: true with brandedContent other than none
    branded_private400privacy: "only_me" with brandedContent other than none
    invalid_post_setting400A value out of range: a number that isn't whole, a volume over 100, endMs not after startMs, a cover frame past 10 minutes, a coverPhotoIndex past the last photo, a blank or too long id or name, or both coverAtMs and coverImageRef

    See Post settings for what each setting does.

    Posting times

    ReasonStatusWhen
    invalid_queue400A time zone that isn't an IANA name (offsets such as +05:00 included), a day outside 0 to 6, a minute outside 0 to 1439, the same time twice, or more than 15 times on one day
    queue_empty400queue: true, or the next free time, on an account with no posting times
    queue_full400No posting time is free in the next 4 weeks

    Stats and replies

    ReasonStatusWhen
    invalid_date_range400to is before from, or the range is over 366 days. For all accounts while one account's subscription isn't active, also a range too long to add up at once: ask per account or for fewer days
    reply_length400A reply that is empty or over 150 characters after spaces at either end are removed. Each emoji counts once

    Limits and our side

    ReasonStatusWhen
    slow_down429Over a rate limit. The answer carries Retry-After: 60. See Rate limits
    unknown_error500Something went wrong on our side. A change can be retried with the same Idempotency-Key
    service_unavailable503We, or TikTok behind us, can't take the request right now. Try again shortly

    Reasons on a failed post or reply

    A post that couldn't go out has status: "failed" and an error with a reason and a message, in the same shape as above. These are the reasons you will see there:

    ReasonWhat happened
    media_rejectedTikTok didn't accept the video. Check it is 3 seconds to 10 minutes, vertical, and under 4 GB
    content_rejectedTikTok didn't allow the post under its rules
    duplicate_postThe account already has this exact post in the last 24 hours. Change the caption or the video
    posting_too_fastTikTok is limiting posts from this account. Try a later time
    daily_limit_reachedTikTok's daily posting limit for the account was reached
    tiktok_drafts_fullThe account already has 5 drafts waiting in TikTok. Post or delete one in the TikTok app
    track_unavailableTikTok wouldn't use the track in settings.music. Pick another one
    tiktok_unavailableTikTok wasn't responding, was busy, or had a problem publishing
    link_unreachableThe media link couldn't be downloaded when the post went out
    account_reconnectingThe account was being reconnected to TikTok at the post's time
    account_not_readyThe account couldn't post at the post's time
    account_needs_setupThe account isn't ready to post yet. Our team has been told
    account_issueThere's a problem with the account. Our team has been told
    post_failedThe post couldn't be published. Our team has been told
    service_unavailableSomething went wrong on our side

    A failed post can also carry invalid_request, upload_expired, unknown_error or another reason from this page. Edit it to try again: see Editing a post.

    A reply that couldn't be sent has status: "failed" in GET /posts/{postId}/comments, with an error. Its reason is usually reply_not_allowed (TikTok didn't accept it, for example because the comment was deleted), comments_unavailable or service_unavailable. To try again, send the reply again with a new Idempotency-Key.