TikTok API Posting for 1–2 Accounts: A Minimal Setup
With one or two TikTok accounts, the hard part of API posting is not volume. It is avoiding a setup that costs more effort than the posting it saves: an app that TikTok will not approve for personal use, or a social media suite built for teams. This article lists what a small setup needs, what it can skip, and shows a complete working example — a content plan in a CSV file and a short script that schedules each day's posts.
What a 1–2 account setup actually needs
- Authorized accounts. Each account connected through TikTok's official OAuth flow, so nobody stores a TikTok password.
- A media source the posting service can read: an upload, a public Google Drive link, or a URL on a domain you control.
- One API call per post with caption, privacy, interaction settings, and the required declarations: rights to the audio, AI-generated content, commercial content.
- Scheduling, either server-side or by running your script at the right time.
- A result check, because TikTok publishes asynchronously and a post can fail after it was accepted.
If you already have a content plan somewhere, whether a spreadsheet, a database, or a folder of finished videos, that list is complete.
What you can usually skip
Social media suites bundle approval workflows, shared inboxes, analytics, and several networks. Those are useful for teams and agencies. For one or two accounts that already have a content source, they mostly add seats and settings. Building your own TikTok app is the opposite extreme: TikTok's app review guidelines exclude apps for private or personal use, and an unaudited app can only publish private posts. How to Get TikTok Posting API for Your Own Account compares these paths in detail.
The middle option is a posting API: a service that has already been approved by TikTok and exposes a simple endpoint. The rest of this article uses PM3K's API. It covers posting, scheduling, media storage, and status tracking; it does not provide analytics, comment management, or other networks.
A minimal example: CSV plan + scheduled posts
The plan is a file named plan.csv, one row per post:
date,time,account_id,video_url,caption,ai_generated
2026-12-07,18:00,ta_MAIN,https://drive.google.com/file/d/FILE_ID_1/view,Three knife skills every beginner needs,no
2026-12-07,19:30,ta_SECOND,https://drive.google.com/file/d/FILE_ID_2/view,Episode 3: the storm,yes
2026-12-08,18:00,ta_MAIN,https://drive.google.com/file/d/FILE_ID_3/view,One-pan dinner in 15 minutes,no
The videos are public Google Drive links (shared with Anyone with the link), so no domain or hosting is needed. The account_id values come from the Dashboard's account Details or from GET /api/v2/tiktok/accounts.
The script, post_today.py, uses only the Python standard library. It sends today's rows to PM3K as scheduled posts:
import csv, datetime, json, os, urllib.error, urllib.request
API = "https://pm3k.org/api/v2/tiktok/posts/batches"
KEY = os.environ["PM3K_API_KEY"]
UTC_OFFSET = "+01:00" # your timezone offset
today = datetime.date.today().isoformat()
with open("plan.csv", newline="", encoding="utf-8") as f:
rows = [row for row in csv.DictReader(f) if row["date"] == today]
for row in rows:
body = {
# Stable key: re-running the script returns the existing batch
"idempotency_key": f"plan-{row['date']}-{row['time']}-{row['account_id']}",
"scheduled_at": f"{row['date']}T{row['time']}:00{UTC_OFFSET}",
"items": [{
"account_id": row["account_id"],
"media": {"media_type": "VIDEO", "source_url": row["video_url"]},
"post_info": {
"title": row["caption"],
"privacy": "PUBLIC_TO_EVERYONE",
"is_aigc": row["ai_generated"] == "yes",
"audio_rights_confirmed": True, # only if you hold the rights
},
}],
}
request = urllib.request.Request(
API,
data=json.dumps(body).encode(),
method="POST",
headers={
"Authorization": f"Bearer {KEY}",
"Content-Type": "application/json",
"User-Agent": "tiktok-plan-script/1.0",
},
)
try:
with urllib.request.urlopen(request) as response:
batch = json.load(response)["batch"]
print(row["time"], row["account_id"], batch["id"], batch["status"])
except urllib.error.HTTPError as error:
print(row["time"], row["account_id"], "error", error.code, error.read().decode())
except urllib.error.URLError as error:
print(row["time"], row["account_id"], "network error", error.reason)
Run it once each morning, before the first post time, for example with cron:
0 7 * * * cd /home/you/tiktok-plan && /usr/bin/python3 post_today.py >> post.log 2>&1
Set PM3K_API_KEY in the cron environment or a protected environment file rather than in the script. Details that make this work reliably:
- The script can stop after submitting. Each row becomes a scheduled batch stored in PM3K, so the post goes out at its time even if your computer is off.
- Re-runs are safe. The idempotency key is built from the row, so running the script twice returns the existing batch instead of creating a duplicate post.
- Times must be in the future. A row whose time has already passed is rejected, which is why the script runs in the morning.
- The Drive file is downloaded when the row is submitted, so the link must already be public by then; it does not need to stay online until the post time.
- Set a User-Agent. Some clients send a default User-Agent that is blocked at the network edge; a descriptive one such as the example avoids that.
To see what happened, check Recent post activity in the Dashboard, or query GET /api/v2/tiktok/posts/batches/BATCH_ID with the batch IDs from the log. A failed post shows last_error_code and last_error_message.
Limits to plan around
| Limit | Value |
|---|---|
| Posts per TikTok account | 10 in any rolling 24 hours |
| Gap between posts to one account | At least 60 seconds |
| Video size | Up to 200 MB |
| Stored media | Kept up to 30 days |
The smallest PM3K plans allow up to 5 connected accounts, which covers a one- or two-account setup with room to grow. Current prices are on the PM3K homepage, and the free trial runs for 30 days.
When this is not the right setup
- You need analytics, comment management, or several social networks in one place: a social media suite fits better.
- You are building a product for other TikTok creators: register your own app and go through TikTok's review.
- You would rather not write any code: the PM3K Dashboard can schedule posts for several accounts without scripts; see TikTok Scheduler for Multiple Accounts. If you use n8n, the same request works from an HTTP Request node, as shown in the n8n tutorial.