How do I post to TikTok with an API?
Send a multipart/form-data request to Upload-Post's POST https://api.upload-post.com/api/upload endpoint with your video file (or a public video URL), a user profile and platform[]=tiktok. Upload-Post runs its own approved TikTok app, so there's no developer application to register, no TikTok audit to pass, and no OAuth tokens to manage. You connect the TikTok account once in the dashboard and that's it. One caveat: TikTok posting needs a paid plan, it's not available on Free.
Steps
- Create an account at upload-post.com and generate an API key in the dashboard under API Keys (see Authentication).
- Connect a TikTok account to a profile at Manage Users. It's a standard TikTok login, no developer setup. For posting on behalf of your users, use white-label JWT connect links.
- Call the upload endpoint:
- cURL
- Python
- JavaScript
curl \
-H 'Authorization: Apikey your-api-key-here' \
-F 'video=@/path/to/your/video.mp4' \
-F 'title="Your Video Title"' \
-F 'user="test"' \
-F 'platform[]=tiktok' \
-X POST https://api.upload-post.com/api/upload
import requests
response = requests.post(
"https://api.upload-post.com/api/upload",
headers={"Authorization": "Apikey your-api-key-here"},
files={"video": open("/path/to/your/video.mp4", "rb")},
data={
"title": "Your Video Title",
"user": "test",
"platform[]": "tiktok",
},
)
print(response.json())
import fs from "node:fs";
const form = new FormData();
form.append("video", new Blob([fs.readFileSync("/path/to/your/video.mp4")]), "video.mp4");
form.append("title", "Your Video Title");
form.append("user", "test");
form.append("platform[]", "tiktok");
const response = await fetch("https://api.upload-post.com/api/upload", {
method: "POST",
headers: { Authorization: "Apikey your-api-key-here" },
body: form,
});
console.log(await response.json());
video also accepts a public URL instead of a file: -F 'video="https://example.com/videos/myvideo.mp4"'.
Useful TikTok parameters
All parameters are documented in the Upload Video reference. The most used ones:
| Parameter | What it does | Default |
|---|---|---|
tiktok_title | TikTok-specific caption (falls back to title). Max 2,200 chars for video. | title |
post_mode | DIRECT_POST publishes immediately; MEDIA_UPLOAD sends the video to the user's TikTok inbox/drafts. | DIRECT_POST |
privacy_level | PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY | PUBLIC_TO_EVERYONE |
disable_comment / disable_duet / disable_stitch | Turn off comments, duets or stitches | false |
cover_timestamp | Video frame (ms) to use as cover | 1000 |
is_aigc | Declare AI-generated content | false |
scheduled_date | ISO-8601 date to schedule the post | none |
async_upload | Return immediately with a request_id and process in background (recommended) | false |
We recommend post_mode=MEDIA_UPLOAD (Draft): the video lands in the TikTok inbox and the user publishes it from the app, which typically performs better in TikTok's distribution. In Draft mode TikTok ignores title/privacy metadata sent via API.
TikTok photo slideshows
Post images (with optional automatic music) through the Upload Photos endpoint:
curl -X POST https://api.upload-post.com/api/upload_photos \
-H 'Authorization: Apikey your-api-key-here' \
-F 'photos[][email protected]' \
-F 'photos[][email protected]' \
-F 'title="Photo slideshow with music"' \
-F 'user="test"' \
-F 'platform[]=tiktok' \
-F 'auto_add_music=true'
Limits and gotchas
- Daily cap: 15 TikTok posts per connected account per rolling 24 h (upload limits).
- Free plan: TikTok uploads return
403; you need a paid plan (pricing & limits). reached_active_user_caperror: a temporary TikTok platform limit. See the workaround guide.- Formats: see Video Requirements for TikTok's accepted formats and sizes.