Python Tutorial

How to Upload Videos to TikTok with Python

Complete tutorial to upload, schedule, and automate TikTok video posting using Python. From pip install to published video in 5 minutes.

TL;DR — Upload to TikTok with Python in 4 Lines

pip install multi-upload-tool
from multi_upload_tool import MultiUploadClient

client = MultiUploadClient(api_token="your-api-token")
upload = client.uploads.upload(
    account_id=123,
    file_path="video.mp4",
    title="My TikTok Video #python",
)
print(upload)  # {"status": "published", "url": "https://vm.tiktok.com/..."}

Why Upload to TikTok with Python?

Uploading videos to TikTok manually is fine for one video. But when you need to post daily, manage multiple accounts, or integrate TikTok publishing into your app, you need automation.

Common use cases for programmatic TikTok uploads:

  • Content automation: Schedule a week of TikTok content with a Python script
  • Multi-account management: Post to 10+ TikTok accounts without logging in manually
  • SaaS integration: Add "publish to TikTok" as a feature in your product
  • Batch processing: Upload 50+ videos from a local file list
  • CI/CD pipelines: Automatically publish videos after editing/rendering

TikTok API Options for Python Developers

There are two approaches to upload videos to TikTok with Python:

❌ Direct TikTok API (Hard Way)

  • • Apply for TikTok Developer access (weeks)
  • • Implement OAuth2 flow with PKCE
  • • Handle token refresh every 24 hours
  • • Manage video chunked upload protocol
  • • Monitor for API breaking changes
  • • Handle rate limiting and retries

Estimated time: 2-4 weeks of development

✅ Multi Upload Tool SDK (Easy Way)

  • pip install multi-upload-tool
  • • OAuth handled via dashboard (one-time)
  • • Token refresh is automatic
  • • Simple file upload — no chunking
  • • We handle API changes for you
  • • Built-in retry logic

Estimated time: 5 minutes

Step 1: Install the SDK

Install the multi-upload-tool Python package from PyPI:

pip install multi-upload-tool

Requirements: Python 3.8+. No other dependencies.

Step 2: Get Your API Token

  1. Sign up at multi-upload-tool.com
  2. Go to Settings → API Keys
  3. Click "Create API Key" and copy your token
Security tip: Store your API token in an environment variable, not in your code. Use os.environ.get("MUT_API_TOKEN").

Step 3: Connect Your TikTok Account

  1. In the dashboard, click "Add Account" → TikTok
  2. Authorize via TikTok's official OAuth flow (no password shared)
  3. Note the Account ID shown in the dashboard — you'll need it for API calls

Step 4: Upload a Video to TikTok

from multi_upload_tool import MultiUploadClient

# Initialize client
client = MultiUploadClient(api_token="your-api-token")

# Upload a video to TikTok
upload = client.uploads.upload(
    account_id=123,                 # Your TikTok account ID
    file_path="/path/to/video.mp4", # Local video file
    title="My first automated TikTok! #python #coding",
    privacy_level="PUBLIC_TO_EVERYONE",  # or "SELF_ONLY", "MUTUAL_FOLLOW_FRIENDS"
)

print(f"Status: {upload['status']}")
print(f"TikTok URL: {upload['url']}")

client.close()

That's it — your video is now published on TikTok.

Advanced: Schedule, Bulk Upload, Multi-Platform

Schedule a TikTok Post for Later

from multi_upload_tool import MultiUploadClient
from datetime import datetime, timedelta

client = MultiUploadClient(api_token="your-api-token")

# Schedule for tomorrow at 7 PM EST
tomorrow_7pm = (datetime.now() + timedelta(days=1)).replace(hour=19, minute=0)

upload = client.uploads.upload(
    account_id=123,
    file_path="video.mp4",
    title="Scheduled post 📅",
    schedule_date=tomorrow_7pm.isoformat(),
)
print(f"Scheduled for: {tomorrow_7pm}")

client.close()

Bulk Upload from a File List

from multi_upload_tool import MultiUploadClient

client = MultiUploadClient(api_token="your-api-token")

        # List of videos with metadata
        videos = [
          {"file_path": "video_01.mp4", "title": "Morning routine", "schedule_date": "2026-02-20T19:00:00Z"},
          {"file_path": "video_02.mp4", "title": "Quick tip", "schedule_date": "2026-02-21T19:00:00Z"},
        ]

        for video in videos:
          upload = client.uploads.upload(
            account_id=123,
            file_path=video["file_path"],
            title=video["title"],
            schedule_date=video["schedule_date"],
          )
          print(f"✅ Scheduled: {video['title']}")

client.close()

Upload to TikTok + YouTube + Instagram at Once

from multi_upload_tool import MultiUploadClient

client = MultiUploadClient(api_token="your-api-token")

# Get all connected accounts
accounts = client.accounts.list(status="active")
account_ids = [a["id"] for a in accounts]

# Upload to ALL platforms in one call
upload = client.uploads.upload(
    account_id=account_ids,  # List of account IDs
    file_path="video.mp4",
    title="Published everywhere! 🚀",
)

# Check status per platform
for platform_result in upload["results"]:
    print(f"{platform_result['platform']}: {platform_result['status']}")

client.close()

Alternative: Use the REST API Directly

If you prefer not to use the SDK, you can call the API directly with requests:

import requests

url = "https://api.multi-upload-tool.com/api/v1/upload"
headers = {"x-api-token": "YOUR_API_TOKEN"}

with open("video.mp4", "rb") as f:
    response = requests.post(
        url,
        headers=headers,
        files={"video": f},
        data={
            "accountId": "123",
            "title": "My TikTok Video #python",
            "privacy_level": "PUBLIC_TO_EVERYONE",
        },
    )

print(response.json())

Troubleshooting

Video format not supported

Our API accepts MP4, MOV, and AVI. We auto-transcode to TikTok's requirements. If your file is in another format, convert it to MP4 first with FFmpeg: ffmpeg -i input.webm output.mp4

OAuth token expired

Multi Upload Tool handles token refresh automatically. If you see auth errors, reconnect your TikTok account in the dashboard — the OAuth grant may have been revoked.

Rate limit exceeded

Free tier: 15 uploads/month. Upgrade to Basic ($9.99/mo) for unlimited uploads. The SDK includes built-in retry logic with exponential backoff.

Start Uploading to TikTok with Python

Free plan available. Install the SDK and publish your first TikTok video in under 5 minutes.

Frequently Asked Questions

How do I upload a video to TikTok with Python?

Install the multi-upload-tool SDK with `pip install multi-upload-tool`, create a client with your API token, and call `client.uploads.upload(account_id=123, file_path='video.mp4', title='My Video')`. The SDK handles OAuth2, video transcoding, and TikTok's Content Posting API.

Is there a Python library for TikTok uploads?

Yes. The `multi-upload-tool` package on PyPI provides a Python SDK for uploading videos to TikTok. Install with `pip install multi-upload-tool`. It also supports YouTube Shorts, Instagram Reels, Facebook, and LinkedIn.

Do I need TikTok developer access to use the API?

No. Multi Upload Tool handles all TikTok API complexity for you. You don't need to apply for TikTok developer access, manage OAuth tokens, or deal with the Content Posting API directly. Just use our SDK with your MUT API token.

Can I schedule TikTok posts with Python?

Yes. Add a `schedule_date` parameter with an ISO 8601 timestamp to your upload call: `client.uploads.upload(account_id=123, file_path='video.mp4', title='Scheduled', schedule_date='2026-03-01T19:00:00Z')`.

How do I upload to TikTok and YouTube at the same time with Python?

Pass multiple account IDs to the upload method: `client.uploads.upload(account_id=[tiktok_id, youtube_id], file_path='video.mp4', title='My Video')`. One API call, both platforms.

What video formats does the TikTok upload API support?

MP4, MOV, and AVI up to 4GB. Our server-side FFmpeg processing automatically transcodes videos to meet TikTok's requirements (H.264 codec, AAC audio, 9:16 aspect ratio).

Is using a third-party API safe for TikTok? Will I get shadowbanned?

Multi Upload Tool is an official TikTok Content Posting API partner. We use the official API, not browser automation. TikTok treats our uploads identically to native uploads — no shadowban risk.

How much does the TikTok upload API cost?

Free plan: 15 uploads/month. Basic: $9.99/month (unlimited uploads). Pro: $19.99/month (API access, webhooks). All plans include TikTok support.