TikTok API: Direct Post, privacy options and drafts with APIWings
Status: coming soon. The APIWings integration with TikTok is in review: it opens to beta teams once the network approves it. This page describes how it works.
Accounts
Any TikTok account. Until TikTok audits the APIWings integration, TikTok only lets it publish to private accounts, every post is visible only to its creator (self_only), and at most 5 accounts can post through APIWings per day.
Connecting
POST /v1/profiles/{id}/connect/tiktok returns a connect_url. The user signs in on TikTok and allows APIWings to read their basic profile and post (user.info.basic, video.publish, video.upload). Access tokens last 2 hours and are renewed automatically in the background; the user only reconnects if the renewal stops working, for example because they removed APIWings from their TikTok account.
TikTok's posting screen (required)
TikTok's content sharing guidelines require the app where your user posts to:
- show the creator's nickname (the account the post goes to);
- let the user choose the privacy level, from the options TikTok offers for that account, with no default;
- leave comments, Duet and Stitch off unless the user turns them on, and grey out the ones the account has disabled;
- let the user disclose commercial content (promoting their own business, or a paid partnership).
Get the live data for that screen with GET /v1/accounts/{id}/publish-options (required: true for TikTok). data contains:
| Field | Use |
|---|---|
creator_nickname, creator_username, creator_avatar_url |
Show who the post goes to. |
privacy_level_options |
Offer exactly these values for privacy_level, with none preselected. |
comment_disabled, duet_disabled, stitch_disabled |
true = grey out that toggle. |
max_video_post_duration_sec |
Longest video this account can post. |
audited |
false while TikTok has not audited APIWings: posts stay private. |
Supported content
| Rule | |
|---|---|
| Post type | Either one video or photos (1 to 35 for TikTok; up to 10 through APIWings, the per-post media limit). Never both, and never text-only. |
| Video | MP4 or MOV, up to 1 GB through APIWings (TikTok allows 4 GB). Checked by TikTok when publishing: up to 10 minutes and no longer than the account's max_video_post_duration_sec, 360 to 4096 px on each side, 23 to 60 FPS. |
| Photos | JPEG or WebP (not PNG or GIF), up to 20 MB each. |
| Video caption | content, up to 2,200 characters (UTF-16 code units). |
| Photo post text | content is the description, up to 4,000 characters; options.title is an optional short title, up to 90. |
TikTok downloads the media from APIWings' own media domain. APIWings waits up to 5 minutes for TikTok to finish. If TikTok is still processing after that, the target fails with platform_down and is not retried, because TikTok already has the post and a retry could publish it twice: check the account before posting again.
Options
| Option | Type | Default | Meaning |
|---|---|---|---|
privacy_level |
string | none (required) | PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR or SELF_ONLY. Required for direct posts and chosen by the user; it must be one of the account's privacy_level_options (checked when publishing). |
post_mode |
string | "direct" |
"direct" publishes now. "draft" sends the media to the creator's TikTok inbox, where they edit and post it in the app (privacy is chosen there, so privacy_level is not needed). |
allow_comment |
boolean | false |
Allow comments. Ignored if the account disabled comments. |
allow_duet |
boolean | false |
Allow Duet. Videos only. |
allow_stitch |
boolean | false |
Allow Stitch. Videos only. |
brand_organic_toggle |
boolean | false |
"Your brand": the post promotes the creator's own business (labelled "Promotional content"). |
brand_content_toggle |
boolean | false |
"Branded content": a paid partnership promoting a third party (labelled "Paid partnership"). Cannot be SELF_ONLY. |
is_aigc |
boolean | false |
Label the content as AI-generated. |
title |
string | none | Photo posts only: short title, up to 90 characters. |
video_cover_timestamp_ms |
integer ≥ 0 | TikTok's choice | Videos: the frame used as cover, in milliseconds. |
photo_cover_index |
integer ≥ 0 | 0 |
Photo posts: which photo is the cover (0 = first). |
Unknown options are refused (validation_failed). In draft mode a video is sent without caption or settings, and a photo post with its description, title and photo_cover_index; the creator sets the rest in TikTok.
{ "platform": "tiktok", "options": { "privacy_level": "PUBLIC_TO_EVERYONE", "allow_comment": true, "brand_organic_toggle": true } }
Result and visibility
- Until TikTok audits APIWings:
self_onlyfor every direct post, whateverprivacy_levelwas requested. - After the audit:
PUBLIC_TO_EVERYONE→public;MUTUAL_FOLLOW_FRIENDSandFOLLOWER_OF_CREATOR→private;SELF_ONLY→self_only. - Draft mode:
draft. url: the post on tiktok.com when TikTok returns a public post id. For private posts and drafts TikTok returns none:urlisnullandremote_idis TikTok'spublish_id.
Limits
TikTok allows about 15 posts per creator per day, shared with every app the creator uses; TikTok does not expose the counter. Until the audit, at most 5 accounts can post through APIWings per day. GET /v1/accounts/{id}/limits returns this as a note.
Errors
| When | Code |
|---|---|
Missing or unknown privacy_level, unknown option, Duet/Stitch on photos, branded content with SELF_ONLY, title on a video, too many photos, video and photos together |
validation_failed (when creating the post) |
| A format TikTok does not accept, or files over the size limits | media_invalid (when creating the post) |
privacy_level not offered for this account |
validation_failed |
| Unaudited integration and a public TikTok account | platform_rejected (make the account private, or wait for the audit) |
| File format, duration, frame rate or size rejected by TikTok | media_invalid |
| Daily posting limit of the account, or of APIWings while unaudited | rate_limited (not retried: try again tomorrow) |
| TikTok could not download the media | platform_down (retried) |
| Still processing after 5 minutes | platform_down (not retried) |
| The user removed the app or the token expired | auth_expired, then account.disconnected |
