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
- Sign up at multi-upload-tool.com
- Go to Settings → API Keys
- Click "Create API Key" and copy your token
os.environ.get("MUT_API_TOKEN").Step 3: Connect Your TikTok Account
- In the dashboard, click "Add Account" → TikTok
- Authorize via TikTok's official OAuth flow (no password shared)
- 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.