1. Unaudited apps vs. Direct Post audit approval
Until TikTok approves your app's Direct Post audit, every video uploaded through the API is restricted to SELF_ONLY (private to the creator) or inbox draft mode. Attempting to submit PUBLIC_TO_EVERYONE from an unaudited app fails with an upstream permission error.
PubNio fetches each connected creator's allowed privacy levels and surfaces tiktok_privacy_unsupported during preflight validation so your app or coding agent picks an allowed option cleanly.
| Preflight code | Retryable | Required fix |
|---|---|---|
| tiktok_privacy_unsupported | No | Use a privacy value present in the creator's live options (or SELF_ONLY while unaudited) |
| tiktok_disclosure_required | No | Set commercial disclosure flags explicitly when promoting a brand or paid partnership |
| tiktok_upload_required | No | Stage the video or photo in PubNio before validating or publishing |
| tiktok_too_many_mentions | No | Reduce @mentions inside the caption to TikTok's allowed cap |
2. Staging media and confirming live status
TikTok requires either verified domain pull URLs or chunked binary uploads. Staging media in PubNio handles chunked transfer and status polling automatically, returning either published (for direct post) or provider_draft (when sent to the creator's TikTok inbox).
const video = await ws.media.importUrl({
url: "https://cdn.example.com/demo-clip.mp4",
});
const draft = await ws.posts.create({
isDraft: true,
text: "Built an idempotent TikTok publishing workflow.",
targets: [
{
accountId: tiktokAccountId,
placement: "video",
media: [{ mediaId: video.mediaId }],
settings: { privacy: "PUBLIC_TO_EVERYONE" },
},
],
});
const check = await ws.posts.validate(draft.postId);
if (!check.valid) console.error(check.issues);