Socket
Book a DemoInstallSign in
Socket

@yaring/n8n-nodes-tiktok

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@yaring/n8n-nodes-tiktok

TikTok API integration for n8n - upload videos, get analytics and manage content

0.0.3
unpublished
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

n8n-nodes-tiktok

n8n Community Node npm version

This n8n community node provides comprehensive integration with TikTok API, supporting video management, user analytics, and content publishing with proper OAuth2 authentication.

TikTok is the leading short-form video hosting service with over 1 billion monthly active users worldwide. This node provides comprehensive access to TikTok's Content Posting API, Display API, and user information endpoints.

n8n is a fair-code licensed workflow automation platform.

Table of Contents

Installation

Follow the installation guide in the n8n community nodes documentation.

You can install this node via the n8n community package manager:

npm install n8n-nodes-tiktok

Operations

Video Resource

  • Upload: Upload videos to TikTok (inbox or direct post)
  • Publish: Publish uploaded videos from inbox with metadata
  • List: Get list of user's videos with pagination
  • Get Status: Check upload/publish status of videos

User Resource

  • Get Profile: Retrieve user profile information (username, avatar, bio, etc.)
  • Get Stats: Get user statistics (followers, following, likes, video count)

Analytics Resource

  • Get Video Analytics: Detailed analytics for specific videos (views, likes, comments, shares)
  • Get Performance Metrics: Overall performance metrics for the user account

OAuth2 Setup

Important: TikTok uses non-standard OAuth2 parameters

TikTok API uses client_key instead of the standard client_id parameter. This node includes a custom OAuth2 implementation to handle TikTok's specific requirements.

Setting up TikTok for Developers App

  • Create a TikTok for Developers account: Visit TikTok for Developers

  • Register your app:

    • Go to "Manage apps" → "Add a new app"
    • Fill in app details and complete registration
  • Configure OAuth settings:

    • Add your redirect URI (e.g., http://localhost:5678/rest/oauth2-credential/callback for local n8n)
    • Note your Client Key and Client Secret from the app dashboard
  • Set up credentials in n8n:

    • Client Key: Enter your TikTok app's Client Key (NOT Client ID)
    • Client Secret: Enter your TikTok app's Client Secret
    • OAuth Redirect URL: Must match exactly what you set in TikTok for Developers
    • Scopes: Default includes most common scopes (can be customized)

Required Scopes

Default scopes include:

  • user.info.basic - Basic user information
  • user.info.profile - Extended user profile
  • user.info.stats - User statistics
  • video.list - List user videos
  • video.upload - Upload videos
  • video.publish - Publish videos

Manual Token Setup (Alternative)

If OAuth2 flow doesn't work, you can manually set tokens:

  • Get tokens via TikTok's authorization flow manually
  • Enter Access Token and Refresh Token directly in credentials
  • The node will handle token refresh automatically

Compatibility

  • Minimum n8n version: 0.198.0
  • Tested with n8n versions: 0.198.0+
  • Node version: Requires Node.js 20.15+

Usage Examples

Example 1: Upload Video to TikTok

{
  "resource": "video",
  "operation": "upload",
  "videoUrl": "https://example.com/my-video.mp4",
  "uploadType": "inbox",
  "title": "My Amazing Video",
  "description": "Check out this cool video! #trending #viral",
  "privacy": "PUBLIC_TO_EVERYONE"
}

Example 2: Get User Statistics

{
  "resource": "user",
  "operation": "getStats",
  "statsFields": ["follower_count", "following_count", "likes_count", "video_count"]
}

Example 3: Get Video Analytics

{
  "resource": "analytics",
  "operation": "getVideoAnalytics",
  "videoIds": ["7034682002927550598", "7035783003928561699"],
  "analyticsFields": ["id", "title", "view_count", "like_count", "comment_count", "share_count"]
}

Example Workflow: Auto-Upload with Analytics Tracking

  • HTTP Request → Fetch video from your content system
  • TikTok (Upload) → Upload video to TikTok inbox
  • Wait → Wait for processing (2-3 minutes)
  • TikTok (Get Status) → Check upload status
  • TikTok (Analytics) → Track performance after 24 hours

API Limitations

  • Video upload: Max 20 videos per request for analytics
  • File size: Follow TikTok's video requirements (typically up to 500MB)
  • Rate limits: Respect TikTok's API rate limits
  • Processing time: Videos take 30 seconds to 2 minutes to process

TikTok Requirements

Domain Verification

For pull URL uploads, you must verify domain ownership with TikTok by:

  • Adding DNS TXT records, or
  • Uploading a verification file to your domain

App Review Process

To use Direct Post functionality:

  • Your app must be intended for public use (not internal/private)
  • Submit detailed app review documentation
  • Provide demo videos showing complete integration flow
  • Wait 1-2 weeks for approval

Common Issues & Troubleshooting

Upload Errors

  • Invalid video URL: Ensure the video URL is publicly accessible
  • Domain not verified: Complete TikTok's domain verification process
  • File format: Use supported formats (MP4, MOV, WEBM)

Authentication Issues

  • Token expired: Tokens are automatically refreshed every 24 hours
  • Insufficient scopes: Ensure all required scopes are approved
  • App not approved: Some features require TikTok app approval

Processing Delays

  • Videos typically process within 2 minutes
  • Use the "Get Status" operation to monitor progress
  • Status will change from PROCESSING_UPLOAD to PUBLISH_COMPLETE

Resources

Support

For issues related to:

Contributing

Contributions are welcome! Please read our contributing guidelines and submit pull requests to the GitHub repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Keywords

n8n-community-node-package

FAQs

Package last updated on 11 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.