Skip to content
Developers

    Quickstart

    Markdown
    Create a tiktornado API key, check it, list your accounts, upload a video, schedule it and follow its status, with curl.

    This guide takes you from a new API key to a scheduled TikTok post. You need a tiktornado account with at least one TikTok account that can post, curl, and a short vertical video on your computer.

    There is no test mode. The post you schedule here goes to TikTok on your real account. Cancel it before it goes out if you don't want it.

    1. Create an API key

      Open the API and MCP page in the tiktornado app and click New key. Name it, keep every access ticked, and create it. Copy the key: it is shown only once.

      Put it in an environment variable, so it stays out of your shell history and scripts:

      export TIKTORNADO_API_KEY=<your key>
    2. Check the key

      GET /key answers the key's scopes. It needs no scope, so it is the quickest way to see that a key works.

      curl https://api.tiktornado.com/api/v1/key \
        -H "Authorization: Bearer $TIKTORNADO_API_KEY"
      {
        "scopes": ["posts:write", "posts:read", "stats:read", "accounts:read", "comments:read", "comments:write"]
      }

      A 401 with reason api_key_invalid means the key is wrong or revoked. See Authentication.

    3. Pick an account

      curl https://api.tiktornado.com/api/v1/accounts \
        -H "Authorization: Bearer $TIKTORNADO_API_KEY"
      {
        "accounts": [
          { "id": "j971x2c4ajrq0w8sd5e8fxz3a57v2k8m", "username": "liftwithmaya", "status": "active" },
          { "id": "j975bq1hkz8d3w0xn6c2tfr4p87v9m5a", "username": null, "status": "warming_up" }
        ]
      }

      Use the id of an account whose status is active, shadow_banned or needs_reconnecting: only those take new posts.

    4. Ask for a link for your file. Send its name, its type and its size in bytes (wc -c < leg-day.mp4 prints the size).

      curl https://api.tiktornado.com/api/v1/uploads \
        -H "Authorization: Bearer $TIKTORNADO_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{"accountId": "j971x2c4ajrq0w8sd5e8fxz3a57v2k8m", "filename": "leg-day.mp4", "contentType": "video/mp4", "size": 48213504}'
      {
        "uploadUrl": "https://uploads.example.com/put/leg-day.mp4?signature=EXAMPLE",
        "mediaRef": "https://media.example.com/uploads/7f3a9c/leg-day.mp4",
        "method": "PUT",
        "headers": { "Content-Type": "video/mp4" }
      }

      Keep the mediaRef. It is an opaque value: store it and pass it back exactly as you got it.

      Videos can be MP4, MOV or WebM, up to 4 GB and 3 seconds to 10 minutes long. Photos can be JPEG, PNG or WebP, up to 20 MB.

    5. Upload the file

      Send the file to uploadUrl with an HTTP PUT, with only the headers the answer listed:

      curl -X PUT "<uploadUrl>" \
        -H "Content-Type: video/mp4" \
        --upload-file leg-day.mp4

      The link is for this one file and it expires, so upload soon after you get it, and post the file soon after you upload it.

    6. Schedule the post

      Send the account, the kind, the mediaRef and a time more than 10 minutes ahead. Every change needs an Idempotency-Key header, a value you make up, so a retry can never post twice. See Safe retries.

      curl https://api.tiktornado.com/api/v1/posts \
        -H "Authorization: Bearer $TIKTORNADO_API_KEY" \
        -H "Content-Type: application/json" \
        -H "Idempotency-Key: 5b0f9c3e-8d21-4f6a-9a7e-2c4d1e8b7f30" \
        -d '{"accountId": "j971x2c4ajrq0w8sd5e8fxz3a57v2k8m", "kind": "video", "caption": "Leg day, no excuses #fitness", "mediaRefs": ["https://media.example.com/uploads/7f3a9c/leg-day.mp4"], "scheduledFor": "2026-12-02T15:00:00Z"}'
      {
        "id": "k174wq9nrm6t2f0bd3xh8pz5a87v1c2e",
        "status": "scheduling",
        "scheduledFor": "2026-12-02T15:00:00.000Z"
      }

      Instead of scheduledFor, you can send "postNow": true to post at once, or "queue": true to take the account's next free posting time. See Scheduling and timing.

    7. Follow its status

      curl "https://api.tiktornado.com/api/v1/posts?accountId=j971x2c4ajrq0w8sd5e8fxz3a57v2k8m&limit=10" \
        -H "Authorization: Bearer $TIKTORNADO_API_KEY"
      {
        "posts": [
          {
            "id": "k174wq9nrm6t2f0bd3xh8pz5a87v1c2e",
            "accountId": "j971x2c4ajrq0w8sd5e8fxz3a57v2k8m",
            "username": "liftwithmaya",
            "kind": "video",
            "caption": "Leg day, no excuses #fitness",
            "mediaCount": 1,
            "scheduledFor": "2026-12-02T15:00:00.000Z",
            "status": "scheduled",
            "error": null,
            "settings": null,
            "postNow": false
          }
        ],
        "nextCursor": null
      }

      The post is scheduling until TikTok's scheduler has it, then scheduled. At its time it becomes publishing, then published. If it can't go out it becomes failed, and error says why. See Post statuses.

    Post from a link instead

    If the file is already online, skip the upload and put a public https link straight to the file in mediaRefs. The link must not need a login and must use a host name, not an IP address. Every file is checked before the post is saved, so a link we can't read is refused with link_unreachable or link_not_allowed.

    Next steps