Platform

TikTok Live Integration

Connect to TikTok Live streams for real-time chat, gifts, follows, shares, and engagement events. Perfect for multi-platform streamers who want to automate reactions across all platforms.

Overview

FaustBot's TikTok Live integration connects to TikTok's live streaming platform via the public WebSocket API, allowing you to receive real-time events during your streams. This enables powerful automations like cross-platform alerts, gift reactions, and viewer engagement tracking.

Live Chat

Receive chat messages and comments from TikTok viewers in real-time.

Gifts

React to virtual gifts with automated thank you messages and alerts.

Gift Combos

Track gift combo chains and trigger special effects on completion.

Follows

Welcome new followers during your live stream with custom actions.

Likes

Track likes and create engagement milestones for celebrations.

Shares

Thank viewers who share your stream with their followers.

Viewer Tracking

Monitor viewer join/leave events and live viewer count.

Subscriptions

Celebrate subscriber events with custom alerts.

Questions

Receive Q&A questions from viewers for interactive streams.

TikTok LIVE Requirements

  • Account must be at least 18 years old
  • Minimum of 1,000 followers required to go LIVE
  • TikTok LIVE access must be enabled on your account
  • You must be actively streaming for FaustBot to connect

Setup

Setting up TikTok Live integration is straightforward since it uses TikTok's public WebSocket API. No OAuth authentication is required.

1

Open TikTok Settings

Click TikTok in the FaustBot sidebar to open the TikTok integration page.

2

Enter Your Username

Enter your TikTok username (without the @ symbol) in the Target Username field. This is the account whose live stream FaustBot will connect to.

3

Start Your Live Stream

Go live on TikTok using the TikTok app or TikTok LIVE Studio. FaustBot requires an active live stream to connect.

4

Connect in FaustBot

Once your live stream is active, click Connect in FaustBot. You should see the status change to "Connected" and begin receiving events.

Read-Only Connection

The TikTok Live API is read-only. FaustBot can receive all events but cannot send messages to chat or perform moderation actions. Use this integration to trigger actions in other platforms like OBS, Discord, or Twitch.

Available Triggers

FaustBot can respond to the following TikTok Live events:

Chat Events

Chat Message Fires when a chat message is received in the live stream
Comment Fires when someone comments on the live (alias for chat message)
Question Fires when someone asks a question via the Q&A feature

Gift Events

Gift Fires when someone sends a virtual gift
Gift Combo Fires when a gift combo chain completes

Engagement Events

Follow Fires when someone follows during the live stream
Like Fires when someone likes the live stream
Like Milestone Fires when total likes reach a milestone number
Share Fires when someone shares the live stream
Subscription Fires when someone subscribes

Viewer Events

Viewer Joined Fires when a viewer joins the live stream
Viewer Left Fires when a viewer leaves the live stream
Viewer Milestone Fires when viewer count reaches a milestone number

Stream Events

Stream Online Fires when the live stream starts
Stream Offline Fires when the live stream ends

Effects

The TikTok integration provides the following effects for use in actions:

Connect to TikTok LIVE

Connect to a TikTok LIVE stream by username.

Disconnect from TikTok LIVE

Disconnect from the current TikTok LIVE stream.

Set Target Username

Change the target TikTok username to monitor.

Cross-Platform Actions

While you cannot send messages directly to TikTok chat, you can trigger any other FaustBot action including OBS scene changes, Discord webhooks, Twitch announcements, sound effects, and more.

Variables

The following variables are available in TikTok trigger events:

VariableDescriptionTriggers
%userId%TikTok user IDAll user events
%username%TikTok usernameAll user events
%message%Chat message or comment textChat, Comment
%question%Question text from Q&AQuestion
%avatarUrl%URL to user's avatar imageChat
%giftName%Name of the gift sentGift, Gift Combo
%count%Number of gifts in the eventGift, Gift Combo, Like
%diamondValue%Diamond value of each giftGift
%isCombo%Whether this gift is part of a comboGift
%totalCount%Total count in completed comboGift Combo
%totalDiamonds%Total diamond value of comboGift Combo
%totalLikes%Total likes on the streamLike Milestone
%viewerCount%Current viewer countViewer Milestone
%months%Subscription monthsSubscription
%roomId%TikTok room/stream IDStream Online
%title%Stream titleStream Online
%duration%Stream duration in secondsStream Offline
%totalViewers%Total unique viewersStream Offline

Example Use Cases

Gift Alert System

Create tiered gift alerts that trigger different OBS scenes and sounds based on the diamond value of gifts. Show a small animation for regular gifts, a medium celebration for gifts over 100 diamonds, and a full-screen celebration for gifts over 1000 diamonds.

Cross-Platform Follow Alerts

When someone follows on TikTok, announce it on Twitch chat and post to a Discord channel. This keeps your community informed about growth across all platforms.

Viewer Milestone Celebrations

Trigger special effects when you hit viewer milestones (100, 500, 1000, etc.). Show a celebration animation in OBS and thank your viewers for helping you grow.

Gift Leaderboard

Track gift senders and maintain a leaderboard. Store gift values in variables and display the top gifters on stream using browser source overlays.

Multi-Platform Chat Relay

Display TikTok chat messages in your OBS chat overlay alongside Twitch and YouTube messages for a unified chat experience.

Scripting API

Access TikTok event data from your scripts using the CPH API:

Handling Gifts

React to TikTok gifts with tiered responses
# React to TikTok gifts based on value
def Execute():
    user = args["username"]
    gift = args["giftName"]
    count = int(args["count"])
    diamonds = int(args["diamondValue"])
    total = count * diamonds

    # Log the gift
    CPH.LogInfo(f"{user} sent {count}x {gift} ({total} diamonds)")

    # Tiered responses based on diamond value
    if total >= 1000:
        CPH.RunAction("Big Gift Alert")
        CPH.ObsShowSource("Scenes", "Celebration")
    elif total >= 100:
        CPH.RunAction("Medium Gift Alert")
    else:
        CPH.SendMessage(f"Thanks for the {gift}, {user}!")

    return True

Viewer Milestones

Celebrate viewer count milestones
# Celebrate viewer milestones
def Execute():
    viewers = int(args["viewerCount"])
    milestones = [100, 500, 1000, 5000, 10000]

    for milestone in milestones:
        if viewers == milestone:
            CPH.RunAction(f"Milestone {milestone}")
            CPH.ObsShowSource("Scenes", "Milestone Animation")
            CPH.Wait(5000)
            CPH.ObsHideSource("Scenes", "Milestone Animation")
            break

    return True

Cross-Platform Integration

Mirror TikTok events to other platforms
# Mirror TikTok events to Discord and Twitch
def Execute():
    event = args.get("triggerId", "")
    user = args.get("username", "Unknown")

    if "follow" in event:
        CPH.DiscordPostWebhook("alerts", f"New TikTok follower: {user}!")
        CPH.TwitchAnnounce(f"{user} just followed on TikTok!")

    elif "gift" in event:
        gift = args["giftName"]
        count = args["count"]
        CPH.DiscordPostWebhook("alerts",
            f"{user} sent {count}x {gift} on TikTok!")
        CPH.ObsShowSource("Alerts", "TikTok Gift")

    elif "subscription" in event:
        months = args.get("months", 1)
        CPH.DiscordPostWebhook("alerts",
            f"{user} subscribed for {months} month(s) on TikTok!")

    return True

See the Scripting Guide for the complete API reference.