Build with PirateTok.
Connect to TikTok LIVE in your language. Understand the protocol behind every connection.
Library guides
Installation, working examples, configuration and lifecycle. Choose your language and start receiving events.
12 languagesTikTok protocol
Request contracts, response fields and transport behavior. Go deeper when you need the details.
79 endpoints · 11 behaviorsOne room. A stream of events.
Register a handler, connect to a live account, and receive decoded messages. The library handles the WebSocket and reconnects.
npm install piratetok-live-js
import { TikTokLiveClient, EventType } from "piratetok-live-js";
const client = new TikTokLiveClient("username_here");
client.on(EventType.chat, (message) => {
console.log(message.content);
});
client.on("error", console.error);
await client.connect();
Choose your language
A dedicated guide for every library.
piratetok-live-jsTyped events, promises and an event-emitter API.
Event emitterpiratetok-live-pyAsync sessions with decorator-based event handlers.
asynciopiratetok-live-rsTyped protobuf events through an asynchronous stream.
Async streamgithub.com/PirateTok/live-goTyped events over channels, with context-based cancellation.
ChannelsPirateTok.LiveTyped event callbacks for .NET applications and Unity.
.NET eventscom.piratetok:liveSynchronous sessions or CompletableFuture-based connections.
Callbacks / futurespiratetok_liveEvent callbacks with a Dart-native WebSocket implementation.
Async callbackspiratetok_liveGenServer connections that deliver messages to a process.
Process messagespiratetok-live-luaA polling API for game loops and embedded integrations.
Polling / callbackslibpiratetokA C ABI with background callbacks and JSON event payloads.
C ABIPirateTok.LiveCmdlets for polling, event callbacks and room metadata.
Cmdletspiratetok-live-shShell callbacks and structured event fields for scripts.
Shell functions