tiktok-automation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

TikTok Automation via Rube MCP

通过Rube MCP实现TikTok自动化

Automate TikTok content creation and profile operations through Composio's TikTok toolkit via Rube MCP.
通过Composio的TikTok工具集,借助Rube MCP自动化TikTok内容创作和账号操作。

Prerequisites

前置条件

  • Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
  • Active TikTok connection via
    RUBE_MANAGE_CONNECTIONS
    with toolkit
    tiktok
  • Always call
    RUBE_SEARCH_TOOLS
    first to get current tool schemas
  • 必须已连接Rube MCP(需具备RUBE_SEARCH_TOOLS功能)
  • 通过
    RUBE_MANAGE_CONNECTIONS
    激活TikTok连接,工具集为
    tiktok
  • 请始终先调用
    RUBE_SEARCH_TOOLS
    以获取最新的工具架构

Setup

设置步骤

Get Rube MCP: Add
https://rube.app/mcp
as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
  1. Verify Rube MCP is available by confirming
    RUBE_SEARCH_TOOLS
    responds
  2. Call
    RUBE_MANAGE_CONNECTIONS
    with toolkit
    tiktok
  3. If connection is not ACTIVE, follow the returned auth link to complete TikTok OAuth
  4. Confirm connection status shows ACTIVE before running any workflows
获取Rube MCP:在客户端配置中添加
https://rube.app/mcp
作为MCP服务器。无需API密钥 — 只需添加该端点即可使用。
  1. 通过确认
    RUBE_SEARCH_TOOLS
    能正常响应,验证Rube MCP是否可用
  2. 调用
    RUBE_MANAGE_CONNECTIONS
    ,指定工具集为
    tiktok
  3. 如果连接状态未显示为ACTIVE,请按照返回的授权链接完成TikTok OAuth认证
  4. 在运行任何工作流之前,确认连接状态为ACTIVE

Core Workflows

核心工作流

1. Upload and Publish a Video

1. 上传并发布视频

When to use: User wants to upload a video and publish it to TikTok
Tool sequence:
  1. TIKTOK_UPLOAD_VIDEO
    or
    TIKTOK_UPLOAD_VIDEOS
    - Upload video file(s) [Required]
  2. TIKTOK_FETCH_PUBLISH_STATUS
    - Check upload/processing status [Required]
  3. TIKTOK_PUBLISH_VIDEO
    - Publish the uploaded video [Required]
Key parameters for upload:
  • video
    : Video file object with
    s3key
    ,
    mimetype
    ,
    name
  • title
    : Video title/caption
Key parameters for publish:
  • publish_id
    : ID returned from upload step
  • title
    : Video caption text
  • privacy_level
    : 'PUBLIC_TO_EVERYONE', 'MUTUAL_FOLLOW_FRIENDS', 'FOLLOWER_OF_CREATOR', 'SELF_ONLY'
  • disable_duet
    : Disable duet feature
  • disable_stitch
    : Disable stitch feature
  • disable_comment
    : Disable comments
Pitfalls:
  • Video upload and publish are TWO separate steps; upload first, then publish
  • After upload, poll FETCH_PUBLISH_STATUS until processing is complete before publishing
  • Video must meet TikTok requirements: MP4/WebM format, max 10 minutes, max 4GB
  • Caption/title has character limits; check current TikTok guidelines
  • Privacy level strings are case-sensitive and must match exactly
  • Processing may take 30-120 seconds depending on video size
适用场景:用户想要上传并发布视频到TikTok
工具执行顺序
  1. TIKTOK_UPLOAD_VIDEO
    TIKTOK_UPLOAD_VIDEOS
    - 上传视频文件(必填)
  2. TIKTOK_FETCH_PUBLISH_STATUS
    - 检查上传/处理状态(必填)
  3. TIKTOK_PUBLISH_VIDEO
    - 发布已上传的视频(必填)
上传关键参数
  • video
    :包含
    s3key
    mimetype
    name
    的视频文件对象
  • title
    :视频标题/描述
发布关键参数
  • publish_id
    :上传步骤返回的ID
  • title
    :视频描述文本
  • privacy_level
    :'PUBLIC_TO_EVERYONE', 'MUTUAL_FOLLOW_FRIENDS', 'FOLLOWER_OF_CREATOR', 'SELF_ONLY'
  • disable_duet
    :关闭合拍功能
  • disable_stitch
    :关闭剪映功能
  • disable_comment
    :关闭评论功能
注意事项
  • 视频上传和发布是两个独立步骤;需先上传,再发布
  • 上传完成后,需轮询
    TIKTOK_FETCH_PUBLISH_STATUS
    直到处理完成,再进行发布
  • 视频必须符合TikTok要求:MP4/WebM格式,最大10分钟,最大4GB
  • 描述/标题有字符限制;请查阅TikTok最新规范
  • 隐私级别字符串区分大小写,必须完全匹配
  • 处理时间可能根据视频大小需要30-120秒

2. Post a Photo

2. 发布照片

When to use: User wants to post a photo to TikTok
Tool sequence:
  1. TIKTOK_POST_PHOTO
    - Upload and post a photo [Required]
  2. TIKTOK_FETCH_PUBLISH_STATUS
    - Check processing status [Optional]
Key parameters:
  • photo
    : Photo file object with
    s3key
    ,
    mimetype
    ,
    name
  • title
    : Photo caption text
  • privacy_level
    : Privacy setting for the post
Pitfalls:
  • Photo posts are a newer TikTok feature; availability may vary by account type
  • Supported formats: JPEG, PNG, WebP
  • Image size and dimension limits apply; check current TikTok guidelines
适用场景:用户想要在TikTok发布照片
工具执行顺序
  1. TIKTOK_POST_PHOTO
    - 上传并发布照片(必填)
  2. TIKTOK_FETCH_PUBLISH_STATUS
    - 检查处理状态(可选)
关键参数
  • photo
    :包含
    s3key
    mimetype
    name
    的照片文件对象
  • title
    :照片描述文本
  • privacy_level
    :帖子的隐私设置
注意事项
  • 照片发布是TikTok较新的功能;可用性可能因账号类型而异
  • 支持格式:JPEG、PNG、WebP
  • 图片大小和尺寸有相关限制;请查阅TikTok最新规范

3. List and Manage Videos

3. 列出并管理视频

When to use: User wants to view their published videos
Tool sequence:
  1. TIKTOK_LIST_VIDEOS
    - List user's published videos [Required]
Key parameters:
  • max_count
    : Number of videos to return per page
  • cursor
    : Pagination cursor for next page
Pitfalls:
  • Only returns the authenticated user's own videos
  • Response includes video metadata: id, title, create_time, share_url, duration, etc.
  • Pagination uses cursor-based approach; check for
    has_more
    and
    cursor
    in response
  • Recently published videos may not appear immediately in the list
适用场景:用户想要查看已发布的视频
工具执行顺序
  1. TIKTOK_LIST_VIDEOS
    - 列出用户已发布的视频(必填)
关键参数
  • max_count
    :每页返回的视频数量
  • cursor
    :下一页的分页游标
注意事项
  • 仅返回已认证用户自己的视频
  • 响应包含视频元数据:ID、标题、创建时间、分享链接、时长等
  • 采用基于游标的分页方式;请检查响应中的
    has_more
    cursor
  • 刚发布的视频可能不会立即出现在列表中

4. View User Profile and Stats

4. 查看用户资料和统计数据

When to use: User wants to check their TikTok profile info or account statistics
Tool sequence:
  1. TIKTOK_GET_USER_PROFILE
    - Get full profile information [Required]
  2. TIKTOK_GET_USER_STATS
    - Get account statistics [Optional]
  3. TIKTOK_GET_USER_BASIC_INFO
    - Get basic user info [Alternative]
Key parameters: (no required parameters; returns data for authenticated user)
Pitfalls:
  • Profile data is for the authenticated user only; cannot view other users' profiles
  • Stats include follower count, following count, video count, likes received
  • GET_USER_PROFILE
    returns more details than
    GET_USER_BASIC_INFO
  • Stats may have slight delays; not real-time
适用场景:用户想要查看自己的TikTok资料信息或账号统计数据
工具执行顺序
  1. TIKTOK_GET_USER_PROFILE
    - 获取完整的资料信息(必填)
  2. TIKTOK_GET_USER_STATS
    - 获取账号统计数据(可选)
  3. TIKTOK_GET_USER_BASIC_INFO
    - 获取基础用户信息(替代选项)
关键参数:(无必填参数;返回已认证用户的数据)
注意事项
  • 资料数据仅针对已认证用户;无法查看其他用户的资料
  • 统计数据包括粉丝数、关注数、视频数、获赞数
  • GET_USER_PROFILE
    返回的详情比
    GET_USER_BASIC_INFO
    更多
  • 统计数据可能存在轻微延迟;并非实时数据

5. Check Publish Status

5. 检查发布状态

When to use: User wants to check the status of a content upload or publish operation
Tool sequence:
  1. TIKTOK_FETCH_PUBLISH_STATUS
    - Poll for status updates [Required]
Key parameters:
  • publish_id
    : The publish ID from a previous upload/publish operation
Pitfalls:
  • Status values include processing, success, and failure states
  • Poll at reasonable intervals (5-10 seconds) to avoid rate limits
  • Failed publishes include error details in the response
  • Content moderation may cause delays or rejections after processing
适用场景:用户想要检查内容上传或发布操作的状态
工具执行顺序
  1. TIKTOK_FETCH_PUBLISH_STATUS
    - 轮询获取状态更新(必填)
关键参数
  • publish_id
    :来自之前上传/发布操作的发布ID
注意事项
  • 状态值包括处理中、成功、失败三种状态
  • 请以合理的间隔(5-10秒)轮询,避免触发速率限制
  • 发布失败的响应中会包含错误详情
  • 内容审核可能导致处理完成后出现延迟或被拒绝的情况

Common Patterns

通用模式

Video Publish Flow

视频发布流程

1. Upload video via TIKTOK_UPLOAD_VIDEO -> get publish_id
2. Poll TIKTOK_FETCH_PUBLISH_STATUS with publish_id until complete
3. If status is ready, call TIKTOK_PUBLISH_VIDEO with final settings
4. Optionally poll status again to confirm publication
1. Upload video via TIKTOK_UPLOAD_VIDEO -> get publish_id
2. Poll TIKTOK_FETCH_PUBLISH_STATUS with publish_id until complete
3. If status is ready, call TIKTOK_PUBLISH_VIDEO with final settings
4. Optionally poll status again to confirm publication

Pagination

分页

  • Use
    cursor
    from previous response for next page
  • Check
    has_more
    boolean to determine if more results exist
  • max_count
    controls page size
  • Use
    cursor
    from previous response for next page
  • Check
    has_more
    boolean to determine if more results exist
  • max_count
    controls page size

Known Pitfalls

Known Pitfalls

Content Requirements:
  • Videos: MP4/WebM, max 4GB, max 10 minutes
  • Photos: JPEG/PNG/WebP
  • Captions: Character limits vary by region
  • Content must comply with TikTok community guidelines
Authentication:
  • OAuth tokens have scopes; ensure video.upload and video.publish are authorized
  • Tokens expire; re-authenticate if operations fail with 401
Rate Limits:
  • TikTok API has strict rate limits per application
  • Implement exponential backoff on 429 responses
  • Upload operations have daily limits
Response Parsing:
  • Response data may be nested under
    data
    or
    data.data
  • Parse defensively with fallback patterns
  • Publish IDs are strings; use exactly as returned
Content Requirements:
  • Videos: MP4/WebM, max 4GB, max 10 minutes
  • Photos: JPEG/PNG/WebP
  • Captions: Character limits vary by region
  • Content must comply with TikTok community guidelines
Authentication:
  • OAuth tokens have scopes; ensure video.upload and video.publish are authorized
  • Tokens expire; re-authenticate if operations fail with 401
Rate Limits:
  • TikTok API has strict rate limits per application
  • Implement exponential backoff on 429 responses
  • Upload operations have daily limits
Response Parsing:
  • Response data may be nested under
    data
    or
    data.data
  • Parse defensively with fallback patterns
  • Publish IDs are strings; use exactly as returned

Quick Reference

Quick Reference

TaskTool SlugKey Params
Upload videoTIKTOK_UPLOAD_VIDEOvideo, title
Upload multiple videosTIKTOK_UPLOAD_VIDEOSvideos
Publish videoTIKTOK_PUBLISH_VIDEOpublish_id, title, privacy_level
Post photoTIKTOK_POST_PHOTOphoto, title, privacy_level
List videosTIKTOK_LIST_VIDEOSmax_count, cursor
Get profileTIKTOK_GET_USER_PROFILE(none)
Get user statsTIKTOK_GET_USER_STATS(none)
Get basic infoTIKTOK_GET_USER_BASIC_INFO(none)
Check publish statusTIKTOK_FETCH_PUBLISH_STATUSpublish_id
TaskTool SlugKey Params
Upload videoTIKTOK_UPLOAD_VIDEOvideo, title
Upload multiple videosTIKTOK_UPLOAD_VIDEOSvideos
Publish videoTIKTOK_PUBLISH_VIDEOpublish_id, title, privacy_level
Post photoTIKTOK_POST_PHOTOphoto, title, privacy_level
List videosTIKTOK_LIST_VIDEOSmax_count, cursor
Get profileTIKTOK_GET_USER_PROFILE(none)
Get user statsTIKTOK_GET_USER_STATS(none)
Get basic infoTIKTOK_GET_USER_BASIC_INFO(none)
Check publish statusTIKTOK_FETCH_PUBLISH_STATUSpublish_id