TikTok API

Schedule and automate TikTok posts with SocialSyncerAPI — Videos, photo carousels, privacy settings, and AI disclosure.

Quick Reference

Before You Start

TikTok has a strict daily posting limit for posts created via third-party APIs. This limit is separate from the native app and is account-specific.

Quick Start

Post a video to TikTok in under 60 seconds:

Python (httpx)

import httpx

resp = httpx.post(
    "https://api.socialsyncerapi.com/v1/posts",
    headers={"Authorization": "Bearer sk_your_api_key"},
    json={
        "content": "Check out this amazing sunset! #sunset #nature",
        "mediaItems": [
            {"type": "video", "url": "https://cdn.example.com/sunset-video.mp4"}
        ],
        "platforms": [
            {"platform": "tiktok", "accountId": "YOUR_ACCOUNT_ID"}
        ],
        "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
    }
)
print("Posted to TikTok!", resp.json()["id"])

curl

curl -X POST https://api.socialsyncerapi.com/v1/posts \
  -H "Authorization: Bearer sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Check out this amazing sunset! #sunset #nature",
    "mediaItems": [
      {"type": "video", "url": "https://cdn.example.com/sunset-video.mp4"}
    ],
    "platforms": [
      {"platform": "tiktok", "accountId": "YOUR_ACCOUNT_ID"}
    ],
    "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
  }'

Node.js (fetch)

const resp = await fetch("https://api.socialsyncerapi.com/v1/posts", {
  method: "POST",
  headers: {
    "Authorization": "Bearer sk_your_api_key",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    content: "Check out this amazing sunset! #sunset #nature",
    mediaItems: [
      { type: "video", url: "https://cdn.example.com/sunset-video.mp4" }
    ],
    platforms: [
      { platform: "tiktok", accountId: "YOUR_ACCOUNT_ID" }
    ],
    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
  })
});
const data = await resp.json();
console.log("Posted to TikTok!", data.id);

Content Types

Video Post

A single video post. Videos must be between 3 seconds and 10 minutes long. Vertical 9:16 aspect ratio is the only format that works well on TikTok.

Video — Python

import httpx

resp = httpx.post(
    "https://api.socialsyncerapi.com/v1/posts",
    headers={"Authorization": "Bearer sk_your_api_key"},
    json={
        "content": "New cooking tutorial #recipe #foodtok",
        "mediaItems": [
            {"type": "video", "url": "https://cdn.example.com/cooking-tutorial.mp4"}
        ],
        "platforms": [
            {"platform": "tiktok", "accountId": "YOUR_ACCOUNT_ID"}
        ],
        "tiktokSettings": {
            "privacy_level": "PUBLIC_TO_EVERYONE",
            "allow_comment": True,
            "allow_duet": True,
            "allow_stitch": True,
            "video_cover_timestamp_ms": 3000,
            "content_preview_confirmed": True,
            "express_consent_given": True
        },
        "publishNow": True
    }
)

Video — curl

curl -X POST https://api.socialsyncerapi.com/v1/posts \
  -H "Authorization: Bearer sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "New cooking tutorial #recipe #foodtok",
    "mediaItems": [
      {"type": "video", "url": "https://cdn.example.com/cooking-tutorial.mp4"}
    ],
    "platforms": [
      {"platform": "tiktok", "accountId": "YOUR_ACCOUNT_ID"}
    ],
    "tiktokSettings": {
      "privacy_level": "PUBLIC_TO_EVERYONE",
      "allow_comment": true,
      "allow_duet": true,
      "allow_stitch": true,
      "video_cover_timestamp_ms": 3000,
      "content_preview_confirmed": true,
      "express_consent_given": true
    },
    "publishNow": true
  }'

Video — Node.js

const resp = await fetch("https://api.socialsyncerapi.com/v1/posts", {
  method: "POST",
  headers: {
    "Authorization": "Bearer sk_your_api_key",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    content: "New cooking tutorial #recipe #foodtok",
    mediaItems: [
      { type: "video", url: "https://cdn.example.com/cooking-tutorial.mp4" }
    ],
    platforms: [
      { platform: "tiktok", accountId: "YOUR_ACCOUNT_ID" }
    ],
    tiktokSettings: {
      privacy_level: "PUBLIC_TO_EVERYONE",
      allow_comment: true,
      allow_duet: true,
      allow_stitch: true,
      video_cover_timestamp_ms: 3000,
      content_preview_confirmed: true,
      express_consent_given: true
    },
    publishNow: true
  })
});

Photo Carousel

Up to 35 images in a single post. Photos are auto-resized to 1080x1920. The content field becomes the photo title (90 chars max, hashtags and URLs are auto-stripped). Use the description field inside tiktokSettings for a full caption up to 4,000 characters.

Photo Carousel — Python

import httpx

resp = httpx.post(
    "https://api.socialsyncerapi.com/v1/posts",
    headers={"Authorization": "Bearer sk_your_api_key"},
    json={
        "content": "My travel highlights",
        "mediaItems": [
            {"type": "image", "url": "https://cdn.example.com/photo1.jpg"},
            {"type": "image", "url": "https://cdn.example.com/photo2.jpg"},
            {"type": "image", "url": "https://cdn.example.com/photo3.jpg"}
        ],
        "platforms": [
            {"platform": "tiktok", "accountId": "YOUR_ACCOUNT_ID"}
        ],
        "tiktokSettings": {
            "privacy_level": "PUBLIC_TO_EVERYONE",
            "allow_comment": True,
            "media_type": "photo",
            "photo_cover_index": 0,
            "description": "Full trip recap from our weekend adventure. #travel #roadtrip",
            "auto_add_music": True,
            "content_preview_confirmed": True,
            "express_consent_given": True
        },
        "publishNow": True
    }
)

Photo Carousel — curl

curl -X POST https://api.socialsyncerapi.com/v1/posts \
  -H "Authorization: Bearer sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "My travel highlights",
    "mediaItems": [
      {"type": "image", "url": "https://cdn.example.com/photo1.jpg"},
      {"type": "image", "url": "https://cdn.example.com/photo2.jpg"},
      {"type": "image", "url": "https://cdn.example.com/photo3.jpg"}
    ],
    "platforms": [
      {"platform": "tiktok", "accountId": "YOUR_ACCOUNT_ID"}
    ],
    "tiktokSettings": {
      "privacy_level": "PUBLIC_TO_EVERYONE",
      "allow_comment": true,
      "media_type": "photo",
      "photo_cover_index": 0,
      "description": "Full trip recap from our weekend adventure. #travel #roadtrip",
      "auto_add_music": true,
      "content_preview_confirmed": true,
      "express_consent_given": true
    },
    "publishNow": true
  }'

Photo Carousel — Node.js

const resp = await fetch("https://api.socialsyncerapi.com/v1/posts", {
  method: "POST",
  headers: {
    "Authorization": "Bearer sk_your_api_key",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    content: "My travel highlights",
    mediaItems: [
      { type: "image", url: "https://cdn.example.com/photo1.jpg" },
      { type: "image", url: "https://cdn.example.com/photo2.jpg" },
      { type: "image", url: "https://cdn.example.com/photo3.jpg" }
    ],
    platforms: [
      { platform: "tiktok", accountId: "YOUR_ACCOUNT_ID" }
    ],
    tiktokSettings: {
      privacy_level: "PUBLIC_TO_EVERYONE",
      allow_comment: true,
      media_type: "photo",
      photo_cover_index: 0,
      description: "Full trip recap from our weekend adventure. #travel #roadtrip",
      auto_add_music: true,
      content_preview_confirmed: true,
      express_consent_given: true
    },
    publishNow: true
  })
});

Video Draft (Creator Inbox)

Set draft: true in tiktokSettings to send the post to the Creator Inbox for review instead of publishing immediately.

Draft — Python

import httpx

resp = httpx.post(
    "https://api.socialsyncerapi.com/v1/posts",
    headers={"Authorization": "Bearer sk_your_api_key"},
    json={
        "content": "Draft video for review",
        "mediaItems": [
            {"type": "video", "url": "https://cdn.example.com/draft.mp4"}
        ],
        "platforms": [
            {"platform": "tiktok", "accountId": "YOUR_ACCOUNT_ID"}
        ],
        "tiktokSettings": {
            "privacy_level": "PUBLIC_TO_EVERYONE",
            "allow_comment": True,
            "draft": True,
            "content_preview_confirmed": True,
            "express_consent_given": True
        },
        "publishNow": True
    }
)

Draft — curl

curl -X POST https://api.socialsyncerapi.com/v1/posts \
  -H "Authorization: Bearer sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Draft video for review",
    "mediaItems": [
      {"type": "video", "url": "https://cdn.example.com/draft.mp4"}
    ],
    "platforms": [
      {"platform": "tiktok", "accountId": "YOUR_ACCOUNT_ID"}
    ],
    "tiktokSettings": {
      "privacy_level": "PUBLIC_TO_EVERYONE",
      "allow_comment": true,
      "draft": true,
      "content_preview_confirmed": true,
      "express_consent_given": true
    },
    "publishNow": true
  }'

Draft — Node.js

const resp = await fetch("https://api.socialsyncerapi.com/v1/posts", {
  method: "POST",
  headers: {
    "Authorization": "Bearer sk_your_api_key",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    content: "Draft video for review",
    mediaItems: [
      { type: "video", url: "https://cdn.example.com/draft.mp4" }
    ],
    platforms: [
      { platform: "tiktok", accountId: "YOUR_ACCOUNT_ID" }
    ],
    tiktokSettings: {
      privacy_level: "PUBLIC_TO_EVERYONE",
      allow_comment: true,
      draft: true,
      content_preview_confirmed: true,
      express_consent_given: true
    },
    publishNow: true
  })
});

Media Requirements

Images

Videos

You cannot mix photos and videos in the same post. Use either all photos (carousel) or one video.

Platform-Specific Data

TikTok settings go in tiktokSettings at the top level of the request body, not inside platformSpecificData. This is a special case unique to TikTok.

Constraints

What You Can't Do

These features are not available through TikTok's API:

Common Errors