TikTok Publishing
Learn how to connect TikTok accounts and upload videos to TikTok.
Connecting TikTok Account
Prerequisites
- A TikTok account (set to Private for sandbox mode)
- 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
Sandbox Mode Requirements
During TikTok's sandbox/development phase:
- Your TikTok account must be set to Private
- Videos will be published with
SELF_ONLYprivacy - Videos are only visible to you
- This is a TikTok API requirement for unaudited apps
Supported Content Types
TikTok supports video uploads only (no photos or text-only posts):
| Feature | Description | Required | Limits |
|---|---|---|---|
| Video | Video file URL | Yes | MP4 format recommended |
| Caption | Video caption/description | No | Max 2200 characters |
| Privacy | Privacy setting | No | SELF_ONLY (sandbox), PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS |
| File Size | Maximum video size | - | Up to 4GB |
| Duration | Video length | - | 10 minutes max |
Publishing Examples
1. Basic Video Upload
{
"post": {
"accountId": "your-tiktok-account-id",
"content": {
"text": "Check out this amazing video! #tiktok #trending",
"mediaUrls": ["https://example.com/video.mp4"],
"platform": "tiktok"
},
"target": {
"targetType": "tiktok"
}
}
}
Result: Video uploaded with caption.
2. Video with Hashtags
{
"post": {
"accountId": "your-tiktok-account-id",
"content": {
"text": "Dancing to the latest trend! π #dance #fyp #trending #viral",
"mediaUrls": ["https://storage.googleapis.com/my-bucket/dance-video.mp4"],
"platform": "tiktok"
},
"target": {
"targetType": "tiktok"
}
}
}
Result: Video with caption and hashtags.
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. "unaudited_client_can_only_post_to_private_accounts"
Cause: Your TikTok account is not set to Private (required for sandbox mode).
Solution:
- Go to TikTok app settings
- Set your account to Private
- Disconnect and reconnect your TikTok account in Boring
- Try publishing again
3. "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.
4. "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