TikTok
Social PostingPublish videos and photo carousels to TikTok with the Zernio API, with creator privacy levels, duet and stitch controls, custom covers, AI disclosure and Creator Inbox drafts.
Authentication details
Connecting accounts guidePermissions6 scopes
- Always requested
- Posting
- Analytics
- Comments
- Extras
Pass scopes=posting,analytics to the connect endpoint to ask only for those areas. The first row comes with every connection.
Publish videos and photo carousels to TikTok with POST /v1/posts and platform: "tiktok". Settings go in a top-level tiktokSettings object.
The same account also serves post and account analytics, DMs and comments.
Quick reference
| Property | Value |
|---|---|
| Character limit | 2,200 (video caption), 4,000 (photo description) |
| Photo title | 90 characters (auto-truncated, hashtags stripped) |
| Photos per post | 35 (carousel) |
| Videos per post | 1 |
| Photo formats | JPEG, PNG, WebP |
| Photo max size | 20 MB |
| Video formats | MP4, MOV, WebM |
| Video max size | 4 GB |
| Video duration | 3 seconds to 10 minutes |
| Post types | Video, Photo carousel |
| Scheduling | Yes |
| Video privacy | Public only on TikTok Business app connections; the creator's allowed levels on developer app connections |
| Inbox (comments) | Yes (accounts connected through TikTok's Business app) |
| Comment automations | Public reply only, comments arrive by webhook (comment automations) |
| Inbox (DMs) | Replies only, on TikTok Business Accounts registered outside the EEA, Switzerland and the UK (details) |
| Analytics | Limited |
Before you start
TikTok requires media on every post. There are no text-only posts.
Every post also needs content_preview_confirmed: true and express_consent_given: true, a legal requirement from TikTok.
privacy_level must be one of the values TikTok reports for that creator. Read creator info before you build the request.
On an account connected through TikTok's Business app, a video direct post is public and any other level is rejected (connection lanes).
Both Zernio and TikTok cap how many posts an account can create through the API per rolling 24 hours (daily posting caps).
Content moderation is stricter through the API than in the app.
A post from an account connected through TikTok's developer app can fail with "TikTok direct posting is at capacity right now". Nothing is wrong with the account or the media.
TikTok caps how many distinct developer app accounts can direct-post through the Zernio app per rolling 24 hours. The cap is shared by every Zernio customer on that lane.
Accounts connected through TikTok's Business app, which is every new connection, never hit it. See Direct posting at capacity.
Connect
Call GET /v1/connect/tiktok with profileId on Get OAuth connect URL.
The connecting accounts guide covers the OAuth flow and scopes in general. Account health reports what a connected account can do with the scopes the user granted.
Connection lanes
TikTok connections now go through the TikTok for Business app.
An account connected earlier stays on TikTok's developer app until its owner reconnects it. The lane is decided when the account is connected.
Which lane an account is on changes three things:
- Capacity: developer app accounts share the app-wide direct posting cap, Business app accounts are exempt from it.
- Video privacy: Business app accounts publish videos as public only, and Creator Inbox drafts are the only route to a non-public video. Photo posts keep every level the creator allows on both lanes.
- Inbox: DMs and comment management need a Business app connection (Inbox).
Reconnecting an account is what moves it to the Business app:
- A profile can hold several TikTok accounts. Connecting a TikTok account the profile already has refreshes it instead of adding a second copy.
- Reconnecting the same account keeps it and its history.
- Authorizing a different account takes the slot and permanently deletes the previous account's analytics, inbox and DM history.
- Zernio tells “same vs different” by the last connected
@handle; if the handle was renamed on TikTok since the last connect, it may be treated as a different account.
Note: If the authorization leaves out a permission the already-connected account needs, nothing changes and the flow returns
missing_tiktok_permissions. Connect again and accept every permission on TikTok’s consent screen.
OAuth scopes
TikTok connects through TikTok's Accounts API, which refuses to reconnect an account without the video scopes.
So on TikTok, scopes trims only the analytics, comments and messaging scopes.
Publish a post
This request publishes a video to TikTok right away. tiktokSettings must include content_preview_confirmed and express_consent_given.
import Zernio from '@zernio/node';
const zernio = new Zernio();
const { data: published } = await zernio.posts.createPost({
body: {
content: 'New cooking tutorial #recipe #foodtok',
mediaItems: [
{ type: 'video', url: 'https://cdn.example.com/cooking-tutorial.mp4' }
],
platforms: [
{ platform: 'tiktok', accountId: '66b2e19d8c3f5a7e9d0b1c2d' }
],
tiktokSettings: {
privacy_level: 'PUBLIC_TO_EVERYONE',
allow_comment: true,
allow_duet: true,
allow_stitch: true,
content_preview_confirmed: true,
express_consent_given: true
},
publishNow: true
}
});
console.log(published.post.platforms[0].status);Every option is on Posts.
In this section
Posts
Video posts, covers, photo carousels, creator info, commercial content, posting caps and Creator Inbox drafts.
Locations & music
Search TikTok locations and Commercial Music Library tracks and attach them to a post.
Platform fields
Every tiktokSettings field you can send with a TikTok post.
Media requirements
Image and video requirements for TikTok posts, and the rules for media URLs.
Analytics
Post and account metrics TikTok returns through Zernio.
Inbox
TikTok direct messages, comments, pinned comments and webhooks.
Limits & errors
What TikTok's API does not expose and the common errors when publishing.
Related
- Connecting accounts: the OAuth flow.
- Create post: every field of the request.
- Media uploads: upload videos and photos instead of hosting them.
- Analytics and Account insights: post and account metrics.
- Rate limits: how Zernio handles TikTok's quotas.
- Pricing: what a connected account and analytics cost.
TikTok
14- GET
- GET
- GET
- POST
- GET
- DELETE
- GET
- GET
- GET
- POST
- GET
- GET
Publishing
24· Unified API, shared with other platforms- POST
- POST
- POST
- POST
- GET
- POST
- GET
- PUT
- DELETE
- POST
- POST
- POST
Analytics
8· Unified API, shared with other platforms- GET
- GET
- GET
- GET
- GET
- GET
- GET
- GET
Direct messages
24· Unified API, shared with other platforms- GET
- POST
- GET
- GET
- PUT
- DELETE
- GET
- POST
- PATCH
- DELETE
- POST
- POST
Comments
15· Unified API, shared with other platforms- GET
- GET
- POST
- DELETE
- PATCH
- POST
- POST
- DELETE
- POST
- DELETE
- POST
- DELETE