TikTok
SimplePost uses TikTok's Content Posting API for videos and photos. TikTok app review status affects whether you can publish publicly or only upload drafts/private posts.
Content support
| Capability | Support |
|---|---|
| Videos | One video per post. MP4 recommended. Max file size 4 GB. |
| Photos | One photo per post. JPEG or PNG. Max file size 50 MB. |
| Caption | 2200 characters for video posts, 90 characters for photo posts. |
| Required media | Yes. |
| Publish modes | public (direct publish) or draft (upload to TikTok inbox for the user to publish manually). |
| Visibility | public, friends, or private when direct publishing. |
| Interactions | Comment, duet, and stitch controls. |
Unaudited TikTok apps may require the TikTok account to be private and may restrict public publishing. Use visibility: "private" while testing if your app is not reviewed.
Set up credentials
- Create a TikTok developer app.
- Enable Content Posting products.
- Configure redirect URIs for your app or Scheduler deployment.
- Request posting scopes.
- Authorize the creator account.
- Store the access token returned by TikTok.
- Confirm that the app tier and account privacy settings allow the publishing mode you plan to use.
The CLI does not bundle a TikTok OAuth app. To use it from the CLI, supply your own client key through the OAuth prompt and the client secret through SIMPLE_POST_TIKTOK_CLIENT_SECRET before running simplepost account add tiktok.
Environment variables
TIKTOK_ACCESS_TOKEN=
SDK options
await post({
content: {
text: "Check out this video",
media: [
{
type: "video",
path: "./video.mp4",
title: "My TikTok Video",
},
],
},
platforms: ["tiktok"],
options: {
tiktok: {
publishMode: "draft",
visibility: "private",
allowComment: true,
allowDuet: true,
allowStitch: true,
},
},
});
| Option | Values | Description |
|---|---|---|
publishMode | draft, public | Upload to inbox or publish immediately. |
visibility | public, friends, private | Who can view direct posts. |
allowComment | boolean | Allow comments. |
allowDuet | boolean | Allow duets. |
allowStitch | boolean | Allow stitches. |
REST server account
Add this entry under accounts in the self-hosted REST server's accounts.json:
{
"id": "tiktok-creator",
"platform": "tiktok",
"username": "yourbrand",
"credentials": { "accessToken": "..." },
"options": {
"publishMode": "public",
"visibility": "public"
}
}