| id | ailey-soc-tiktok |
| name | TikTok Content Manager |
| description | Comprehensive TikTok integration with multi-tier API access support, OAuth authentication, video upload/management, analytics, comment engagement, and automatic tier detection. Adapts features dynamically based on account API access level (Login Kit, Display API, Content Posting API, Marketing API). Use when managing TikTok content, automating uploads, analyzing performance, engaging with audiences, or checking API capabilities. |
| keywords | ["tiktok","social media","video","upload","content posting","analytics","engagement","comments","oauth","multi-tier api","tier detection","creator tools","tiktok api"] |
| tools | ["tiktok-client","video-upload","analytics","comment-management","tier-detection"] |
TikTok Content Manager
Comprehensive TikTok integration with intelligent multi-tier API access support. Automatically detects account's API tier and adapts available features accordingly.
Overview
TikTok has a unique multi-tier API system with different approval levels. This skill:
- Automatically detects your API access tier
- Adapts features based on available capabilities
- Provides upgrade paths for unlocking higher tiers
- Works immediately with Tier 1 (Login Kit) access
- Scales up as you gain Content Posting and Marketing API access
When to Use
- Managing TikTok content across accounts
- Automating video uploads and publishing
- Analyzing video and account performance
- Engaging with audience through comments
- Checking API capabilities and tier status
- Multi-platform content distribution
- Creator workflow automation
Installation
cd .github/skills/ailey-soc-tiktok
npm install
Configuration
1. Create TikTok Developer Account
Visit TikTok Developers and create account.
2. Create App
- Go to https://developers.tiktok.com/apps/
- Click "Create an app"
- Fill in app details (name, privacy policy, terms)
- Copy Client Key and Client Secret
3. Configure OAuth
- In app dashboard → "Login Kit"
- Add redirect URI:
http://localhost:3000/auth/callback
- Select scopes based on tier (see below)
4. Environment Setup
Create .env file:
TIKTOK_CLIENT_KEY=your_client_key_here
TIKTOK_CLIENT_SECRET=your_client_secret_here
TIKTOK_ACCESS_TOKEN=your_access_token_here
TIKTOK_REFRESH_TOKEN=your_refresh_token_here
TIKTOK_REDIRECT_URI=http://localhost:3000/auth/callback
API Tiers
Tier 1: Login Kit (Auto-Approved)
What you get:
- ✅ OAuth 2.0 authentication
- ✅ Basic user profile (name, avatar, bio)
- ✅ User consent management
No approval required - available immediately.
Scopes:
user.info.basic
user.info.profile
user.info.stats
Tier 2: Display API (Application Required)
Additional features:
- ✅ Display user videos on external sites
- ✅ Video embed codes
- ✅ Basic video information
Approval: 1-2 weeks
Note: Being phased out - recommend focusing on Tier 3.
Additional scopes:
Tier 3: Content Posting API (Manual Approval - RECOMMENDED)
Additional features:
- ✅ Video uploads via API
- ✅ Post scheduling
- ✅ Video analytics (views, likes, shares)
- ✅ Comment management (read, reply, delete)
- ✅ Audience insights
Approval: 2-8 weeks
How to apply: https://developers.tiktok.com/apps/ → Add products → Content Posting API
Additional scopes:
video.upload
video.publish
comment.list
comment.list.manage
Tier 4: Marketing API (Partner Program)
Additional features:
- ✅ Campaign management
- ✅ Ad creation and targeting
- ✅ Marketing analytics
- ✅ Budget management
- ✅ ROI tracking
Approval: 3-6 months, partner status required
How to apply: https://ads.tiktok.com/marketing_api/
Quick Start
Detect Your API Tier
npm run tiktok detect
This will show:
- Your current API tier
- Available features
- Upgrade path recommendations
Setup Help
npm run tiktok setup
Displays comprehensive setup instructions for all tiers.
Test Connection
npm run tiktok test
Verifies API connection and shows your profile.
Workflows
Workflow 1: Check API Capabilities (All Tiers)
Use when: Starting work, checking account status, verifying approvals.
npm run tiktok detect
What it does:
- Tests API connection
- Detects highest available tier
- Lists available features
- Suggests upgrade path if applicable
When tier is detected:
- Login Kit: Shows how to apply for Content API
- Content Posting: All creator features available
- Marketing API: Full advertising capabilities
Workflow 2: OAuth Authentication (Tier 1+)
Use when: First setup, token expired, re-authorizing account.
npm run tiktok auth start
npm run tiktok test
OAuth Flow:
- Generate authorization URL with required scopes
- User visits URL and grants permissions
- TikTok redirects with authorization code
- Exchange code for access token
- Store token in
.env
Required scopes by tier:
- Tier 1:
user.info.basic
- Tier 2: +
video.list
- Tier 3: +
video.upload,video.publish,comment.list
- Tier 4: +
ad.management,campaign.create
Workflow 3: Upload Video (Tier 3+ Required)
Use when: Publishing content, automating uploads, multi-platform distribution.
npm run tiktok upload video.mp4 --caption "My amazing video! #trending"
npm run tiktok upload video.mp4 \
--caption "Check this out!" \
--privacy SELF_ONLY \
--disable-comment
npm run tiktok upload video.mp4 \
--caption "Brand collaboration" \
--brand-content \
--disable-duet \
--disable-stitch
Video Upload Options:
--caption TEXT - Video caption/description
--privacy LEVEL - PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, SELF_ONLY
--disable-comment - Disable comments
--disable-duet - Disable duet feature
--disable-stitch - Disable stitch feature
--brand-content - Mark as branded content
--brand-organic - Mark as brand organic content
Upload Process:
- Skill detects if Tier 3+ access available
- Uploads video file to TikTok
- Applies caption and settings
- Publishes or saves as draft
- Returns video ID and URL
If Tier 1/2 (no upload access):
❌ Video uploads require Content Posting API (Tier 3)
To unlock this feature:
1. Apply for Content Posting API
2. https://developers.tiktok.com/apps/
3. Approval takes 2-8 weeks
Workflow 4: View Video Analytics (Tier 3+ Required)
Use when: Tracking performance, analyzing engagement, optimizing content.
npm run tiktok analytics video VIDEO_ID
npm run tiktok analytics user
Available Metrics:
-
Video Level:
- Views, likes, comments, shares
- Watch time, completion rate
- Traffic sources
- Audience demographics
-
Account Level:
- Total followers, following
- Total video count
- Engagement rate
- Growth trends
If Tier 1/2 (no analytics access):
❌ Analytics require Content Posting API (Tier 3)
Workflow 5: Manage Comments (Tier 3+ Required)
Use when: Engaging with audience, moderating content, community management.
npm run tiktok comments list VIDEO_ID
npm run tiktok comments reply COMMENT_ID "Thanks for watching!"
npm run tiktok comments delete COMMENT_ID
Comment Operations:
- List all comments on video (paginated)
- Reply to specific comments
- Delete inappropriate comments
- Filter by date, engagement
Use cases:
- Automated moderation (filter spam)
- Engagement responses
- Community management
- Crisis response
Workflow 6: List User Videos (Tier 2+ Required)
Use when: Auditing content, bulk operations, analytics collection.
npm run tiktok videos list
npm run tiktok videos list --limit 50
Information returned:
- Video ID (for other operations)
- Caption/title
- Post date
- View count (if Tier 3+)
- Share URL
Workflow 7: Apply for Higher Tier
Use when: Need video uploads, analytics, or marketing features.
To apply for Tier 3 (Content Posting API):
-
Prepare application:
- Clear use case description
- Content moderation plan
- Privacy/data handling procedures
- Expected upload volume
- Sample integration screenshots
-
Submit application:
-
Wait for approval:
- Check email for status updates
- Typical approval: 2-8 weeks
- May require additional information
-
After approval:
- Update OAuth scopes in app dashboard
- Re-run
npm run tiktok detect to verify
- New features automatically available
Tips for approval:
- Clear use case: Explain exactly how you'll use the API
- Compliance: Show how you'll follow TikTok guidelines
- Data protection: Detail privacy and security measures
- User benefit: Emphasize value to TikTok users
- Moderation: Describe content review process
Examples
Example 1: Automated Content Publishing
#!/bin/bash
for video in /path/to/videos/*.mp4; do
filename=$(basename "$video" .mp4)
npm run tiktok upload "$video" \
--caption "$filename #automation #contentcreator" \
--privacy PUBLIC_TO_EVERYONE
echo "Uploaded: $filename"
sleep 60
done
Example 2: Weekly Performance Report
#!/bin/bash
echo "Weekly TikTok Performance Report"
echo "================================="
echo ""
npm run tiktok analytics user
echo ""
echo "Top Videos This Week:"
echo "---------------------"
npm run tiktok videos list --limit 10
Example 3: Comment Moderation
#!/bin/bash
npm run tiktok comments list VIDEO_ID > comments.json
Example 4: Tier Detection in Scripts
import { TikTokClient, loadConfig } from './tiktok-client.js';
async function uploadVideo(videoPath: string) {
const client = new TikTokClient(loadConfig());
const canUpload = await client.checkFeatureAvailability('video_upload');
if (!canUpload.available) {
console.error(`Cannot upload: ${canUpload.reason}`);
const upgrade = await client.getTierUpgradePath();
console.log(`To unlock uploads: ${upgrade.description}`);
return;
}
const result = await client.uploadVideo({
video: videoPath,
caption: 'My video',
privacy: 'PUBLIC_TO_EVERYONE'
});
console.log(`Uploaded: ${result.share_url}`);
}
Integration Patterns
Pattern 1: Multi-Platform Publishing
Use with other social media skills for unified publishing:
npm run tiktok upload video.mp4 --caption "Check this out!"
npm run instagram content publish reel video.mp4 --caption "Check this out!"
npm run facebook content publish video video.mp4 --message "Check this out!"
Pattern 2: Content Calendar Automation
Combine with scheduling tools:
#!/bin/bash
if [ "$(date +%H)" -eq "18" ]; then
npm run tiktok upload /content/daily/$(date +%Y%m%d).mp4 \
--caption "Daily update for $(date +%B %d)! #daily"
fi
Pattern 3: Analytics Dashboard
Aggregate metrics across platforms:
#!/bin/bash
echo "Social Media Dashboard - $(date)"
echo "=================================="
echo ""
echo "TikTok:"
npm run tiktok analytics user
echo ""
echo "Instagram:"
npm run instagram analytics account
echo ""
echo "Facebook:"
npm run facebook analytics page
Tier Comparison Table
| Feature | Login Kit (Tier 1) | Display API (Tier 2) | Content API (Tier 3) | Marketing API (Tier 4) |
|---|
| OAuth | ✅ | ✅ | ✅ | ✅ |
| User Profile | ✅ | ✅ | ✅ | ✅ |
| List Videos | ❌ | ✅ | ✅ | ✅ |
| Upload Videos | ❌ | ❌ | ✅ | ✅ |
| Analytics | ❌ | ❌ | ✅ | ✅ |
| Comments | ❌ | ❌ | ✅ | ✅ |
| Advertising | ❌ | ❌ | ❌ | ✅ |
| Approval | Auto | 1-2 weeks | 2-8 weeks | 3-6 months |
Troubleshooting
"API tier not detected"
npm run tiktok detect
npm run tiktok test
"Permission denied - requires Content Posting API"
You're attempting Tier 3+ features with Tier 1/2 access.
Solution:
- Apply for Content Posting API: https://developers.tiktok.com/apps/
- Wait for approval (2-8 weeks)
- Re-run
npm run tiktok detect after approval
- Features will automatically unlock
"Access token expired"
npm run tiktok auth start
"Invalid client credentials"
Check your .env file:
TIKTOK_CLIENT_KEY matches app dashboard
TIKTOK_CLIENT_SECRET matches app dashboard
- No extra spaces or quotes
"Video upload failed"
Ensure:
- Video meets TikTok requirements:
- Format: MP4
- Resolution: 720p minimum
- Duration: 3 seconds to 10 minutes
- File size: < 287.6 MB
- You have Tier 3+ access
- Access token is valid
Resources
Best Practices
- Start with Tier 1 - Get OAuth working first
- Apply for Tier 3 early - Approval takes 2-8 weeks
- Test tier detection - Run
detect regularly
- Rate limiting - Respect API limits (varies by tier)
- Error handling - Check tier before feature usage
- Security - Never commit
.env files
- Content guidelines - Follow TikTok community standards
Unique Features
- Automatic tier detection - Adapts to account capabilities
- Upgrade path guidance - Clear instructions for unlocking features
- Graceful degradation - Works with any tier level
- Feature availability checks - Proactive permission validation
- Comprehensive setup guide - Multi-tier configuration support
version: 1.0.0
updated: 2026-01-30
reviewed: 2026-01-30
score: 4.7