TikTok Publishing
β Production Ready - TikTok integration is fully approved and operational. All features work with public videos.
Learn how to connect TikTok accounts and upload videos to TikTok.
Connecting TikTok Account
Prerequisites
- A TikTok account
- Signed in to Boring Dashboard
Connection Steps
- Click the "Connect TikTok" button on the dashboard
- Sign in to TikTok (if not already logged in)
- Review and grant the required permissions:
video.upload- Upload videos to your accountvideo.publish- Publish videosuser.info.basic- Basic user informationuser.info.profile- Profile informationuser.info.stats- User statisticsvideo.list- List your videos
- Click "Authorize" to complete the authorization
Your TikTok account will now appear in the Authorized Accounts list with:
- Display name
- Profile picture
- Platform badge (TikTok)
- Unique Account ID (click "Copy ID" to get it)
- Test Upload button
- Disconnect option
Token Information
- Token Type: OAuth 2.0 Access Token with Refresh Token
- Expiration: Access token expires in 24 hours
- Auto-refresh: Enabled (refresh token used before publishing)
- Refresh Token Expiration: 1 year
- Re-authorization: Only needed if refresh token expires
Privacy Settings
Videos are published with PUBLIC_TO_EVERYONE privacy by default, making them visible to all TikTok users.
Supported Content Types
TikTok supports video uploads and photo carousel posts:
| Feature | Description | Required | Limits |
|---|---|---|---|
| Video | Video file URL | Either video or photos required | MP4 format recommended, up to 4GB, 10 min max |
| Photos | Image file URLs (carousel) | Either video or photos required | JPEG/WEBP only, up to 35 images. PNG auto-converted to JPEG. |
| Caption | Video/photo caption | No | Max 2200 characters |
| Privacy | Privacy setting | Yes | Must be selected by user |
| Draft | Send to inbox as draft | No | Creator publishes manually in TikTok app |
TikTok Options (Required)
As per TikTok Content Posting API compliance, additional options must be provided when publishing:
| Parameter | Type | Required | Description |
|---|---|---|---|
privacyLevel |
string | Yes | Privacy level (no default, must be selected). Values: PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY |
allowComment |
boolean | No | Allow comments on the video (default: false) |
allowDuet |
boolean | No | Allow duet on the video (default: false) |
allowStitch |
boolean | No | Allow stitch on the video (default: false) |
brandContentToggle |
boolean | No | Branded content / paid partnership (default: false) |
brandOrganicToggle |
boolean | No | Your brand / promotional content (default: false) |
draft |
boolean | No | Send to TikTok inbox as draft instead of publishing directly (default: false) |
Privacy Level Restrictions
privacyLevelis required - there is no default value- When
brandContentToggleistrue,privacyLevelcannot beSELF_ONLY(private) - Available privacy levels depend on the creator's account settings
Commercial Content Disclosure
When disclosing commercial content:
- Your Brand (
brandOrganicToggle): Video labeled as "Promotional content" - Branded Content (
brandContentToggle): Video labeled as "Paid partnership" - Both selected: Video labeled as "Paid partnership"
Consent Statement
By publishing to TikTok, users agree to:
- Default: TikTok's Music Usage Confirmation
- With Branded Content: TikTok's Branded Content Policy and Music Usage Confirmation
Publishing Examples
1. Photo Carousel (Public)
{
"post": {
"accountId": "your-tiktok-account-id",
"content": {
"text": "Check out these amazing shots! πΈ #photography #tiktok",
"mediaUrls": [
"https://example.com/photo1.jpg",
"https://example.com/photo2.jpg",
"https://example.com/photo3.jpg"
],
"platform": "tiktok"
}
}
}
Result: Public photo carousel post. PNG images are automatically converted to JPEG.
Note: TikTok only accepts JPEG and WEBP for photos. Boring automatically converts PNG/BMP/GIF/TIFF to JPEG and resizes to max 1080px.
2. Photo Draft (Send to Inbox)
{
"post": {
"accountId": "your-tiktok-account-id",
"content": {
"text": "Draft caption - edit in TikTok app",
"mediaUrls": ["https://example.com/photo.jpg"],
"platform": "tiktok"
},
"tiktokOptions": {
"draft": true
}
}
}
Result: Photos sent to creator's TikTok inbox as draft. Creator edits and publishes manually in the TikTok app.
3. Basic Video Upload (Public)
{
"post": {
"accountId": "your-tiktok-account-id",
"content": {
"text": "Check out this amazing video! #tiktok #trending",
"mediaUrls": ["https://example.com/video.mp4"],
"platform": "tiktok"
},
"tiktokOptions": {
"privacyLevel": "PUBLIC_TO_EVERYONE",
"allowComment": true,
"allowDuet": true,
"allowStitch": true
}
}
}
Result: Public video with comments, duet, and stitch enabled.
2. Private Video (Friends Only)
{
"post": {
"accountId": "your-tiktok-account-id",
"content": {
"text": "Just for my friends! π€«",
"mediaUrls": ["https://example.com/video.mp4"],
"platform": "tiktok"
},
"tiktokOptions": {
"privacyLevel": "MUTUAL_FOLLOW_FRIENDS",
"allowComment": true,
"allowDuet": false,
"allowStitch": false
}
}
}
Result: Video visible only to friends, comments enabled.
3. Branded Content (Paid Partnership)
{
"post": {
"accountId": "your-tiktok-account-id",
"content": {
"text": "Amazing product from @brand! #ad #sponsored",
"mediaUrls": ["https://storage.googleapis.com/my-bucket/sponsored-video.mp4"],
"platform": "tiktok"
},
"tiktokOptions": {
"privacyLevel": "PUBLIC_TO_EVERYONE",
"allowComment": true,
"allowDuet": false,
"allowStitch": false,
"brandContentToggle": true
}
}
}
Result: Public video labeled as "Paid partnership".
Note: Branded content (
brandContentToggle: true) cannot be set to private (SELF_ONLY).
4. Promotional Content (Your Brand)
{
"post": {
"accountId": "your-tiktok-account-id",
"content": {
"text": "Check out my new course! Link in bio π",
"mediaUrls": ["https://example.com/promo-video.mp4"],
"platform": "tiktok"
},
"tiktokOptions": {
"privacyLevel": "PUBLIC_TO_EVERYONE",
"allowComment": true,
"allowDuet": true,
"allowStitch": true,
"brandOrganicToggle": true
}
}
}
Result: Public video labeled as "Promotional content".
Implementation Details
Upload Process
TikTok uses a specialized chunked upload process:
- Download: Video is downloaded from the provided URL
- Chunk Calculation:
- Files < 5MB: Uploaded as single chunk
- Files β₯ 5MB: Split into 10MB chunks using floor division
- Formula:
total_chunks = floor(file_size / chunk_size) - Last chunk absorbs all remaining bytes (can exceed 10MB, max 128MB)
- Initialize: Upload session is initialized with chunk count
- Upload Chunks: Each chunk is uploaded with Content-Range headers
- Processing: TikTok processes the video (takes 10-30 seconds)
- Publish: Video is published to your account
Example Chunk Calculation
For a 29.9MB video (29,957,059 bytes):
- Chunk size: 10MB (10,485,760 bytes)
- Total chunks:
floor(29957059 / 10485760) = 2 - Chunk 1: bytes 0-10,485,759 (10MB)
- Chunk 2: bytes 10,485,760-29,957,058 (19.47MB - absorbs remainder)
Response Format
Successful Response
{
"success": true,
"postSubmissionId": "ca5b8e50-9376-4fbb-b2fc-b619849e3574",
"platform": "tiktok",
"post_type": "video",
"publish_id": "v_pub_file~v2-1.7577571164748499000",
"status": "PUBLISH_COMPLETE",
"message": "Post published successfully"
}
Failed Response
{
"success": false,
"error": "Account is not a TikTok account",
"platform": "tiktok"
}
Common Issues
1. "Account is not a TikTok account"
Cause: The provided accountId belongs to a different platform.
Solution:
- Use the correct TikTok account ID
- Get it from the dashboard by clicking "Copy ID" on your TikTok account
2. "total chunk count is invalid"
Cause: Internal error with chunk calculation (should not happen with current implementation).
Solution: Contact support if you encounter this error.
3. "url_ownership_unverified"
Cause: Trying to use PULL_FROM_URL method without domain verification.
Solution: This should not occur - Boring automatically uses FILE_UPLOAD method which doesn't require URL verification.
Performance Metrics
After publishing, you can view your TikTok video performance:
- Click "View Performance" next to your TikTok account
- View metrics for your videos:
- Views: Number of times your video was viewed
- Likes: Number of likes on your video
- Comments: Number of comments
- Shares: Number of times your video was shared
- Video Description: Caption text
- Duration: Video length in seconds
- Create Time: When the video was published
Best Practices
- Video Format: Use MP4 format for best compatibility
- File Size: Keep videos under 100MB for faster upload
- Captions: Use engaging captions with relevant hashtags
- Hashtags: Include 3-5 relevant hashtags for better discoverability
- Video Quality: Upload in 1080p or higher for best quality
- Duration: Keep videos between 15-60 seconds for best engagement
- Testing: Use the "Test Upload" button before API integration
Rate Limits
TikTok API has the following rate limits:
- Publishing: 6 videos per hour per account
- Performance: 100 requests per day per account
Exceeding these limits will result in 429 Too Many Requests errors.
Next Steps
- Publishing API Reference - Complete API documentation
- Python Examples - Code examples in Python
- JavaScript Examples - Code examples in JavaScript
- cURL Examples - Command-line examples