Switch from TikTok-Live-Connector in Seconds
Already using tiktok-live-connector? Switch to the managed TikTool API with a single import line change. Same event names, same methods, zero code changes.
Install the SDK
npm install tiktok-live-apiChange one import line
const { WebcastPushConnection } = require('tiktok-live-connector');const { WebcastPushConnection } = require('tiktok-live-api');Use your TikTools API key
signApiKey: 'EULER_API_KEY'signApiKey: 'TIKTOOL_API_KEY'Get a free key at tik.tools - no credit card required.
Full Working Example
This code runs identically with both tiktok-live-connector and tiktok-live-api. Only the import changes.
// Before: const { WebcastPushConnection } = require('tiktok-live-connector');
const { WebcastPushConnection } = require('tiktok-live-api');
const connection = new WebcastPushConnection('username', {
signApiKey: 'YOUR_TIKTOOL_API_KEY',
});
connection.on('chat', data => {
console.log(`${data.user.uniqueId}: ${data.comment}`);
});
connection.on('gift', data => {
console.log(`${data.user.uniqueId} sent ${data.giftName}`);
});
connection.on('roomUser', data => {
console.log(`Viewers: ${data.viewerCount}`);
});
connection.on('connected', state => {
console.log('Connected!', connection.getState());
});
connection.connect();100% Event Name Compatibility
Every TTLC event name works exactly the same. We also fire the native TikTools name simultaneously.
| TTLC Event Name | Status | Notes |
|---|---|---|
chat | ✓ | Identical |
member | ✓ | Identical |
gift | ✓ | Identical |
like | ✓ | Identical |
follow | ✓ | Identical |
share | ✓ | Identical |
subscribe | ✓ | Identical |
social | ✓ | Identical |
roomUser | ✓ | Alias for roomUserSeq - both fire |
questionNew | ✓ | Alias for question - both fire |
linkMicBattle | ✓ | Alias for battle - both fire |
linkMicArmies | ✓ | Alias for battleArmies - both fire |
emote | ✓ | Alias for emoteChat - both fire |
envelope | ✓ | Identical |
liveIntro | ✓ | Identical |
roomPin | ✓ | Identical |
barrage | ✓ | Identical |
superFan | ✓ | New in 2.0.8 - supported |
superFanJoin | ✓ | New in 2.0.8 - supported |
superFanBox | ✓ | New in 2.0.8 - supported |
connected | ✓ | Identical |
disconnected | ✓ | Identical |
error | ✓ | Identical |
streamEnd | ✓ | Identical |
rawData | ✓ | Fires with full raw event payload |
websocketConnected | ✓ | Fires on WS open |
Why Switch to the Managed API?
Never Breaks
TikTok updates their protocol regularly, breaking direct integrations. TikTool handles all protocol changes for you - zero downtime.
Faster Event Delivery
Sub-50ms event latency through our optimized infrastructure. No protobuf decoding on your end.
Zero Dependencies
No protobufjs, no ws-client, no HTTP signing. Just one npm package with zero external dependencies.
Auto Reconnection
Built-in exponential backoff reconnection. Your connection survives network blips and TikTok server restarts.
Usage Dashboard
Monitor your API usage, WebSocket connections, and event volume in real-time at tik.tools/dashboard.
Developer Support
Get help via Discord, email, or the in-app support chat. Response time under 4 hours.
Common Questions
Will my TypeScript types still work?
Yes. tiktok-live-api ships full TypeScript definitions for every event payload - chat, gift, roomUser, and all others. If you were using TTLC's community-maintained types, ours are stricter and kept up to date with TikTok's actual protobuf schema.
What about TTLC options like sessionId, processInitialData, and requestPollingIntervalMs?
The constructor options that control connection behavior - sessionId, requestPollingIntervalMs, enableExtendedGiftInfo, and similar - are accepted and forwarded. Options that no longer apply (like processInitialData) are silently ignored so your config object doesn't need cleanup.
TTLC sometimes works without an API key. Do I need one for TikTool?
Yes - a signApiKey is required. The free Sandbox key takes 30 seconds to get at tik.tools/login with no credit card. Sandbox includes 2,500 API calls/day and 15 WebSocket connections, which is enough for development and testing.
What actually happens when TikTok updates their protocol?
With TTLC, TikTok's periodic signature algorithm and protobuf schema updates cause the library to stop working - sometimes within hours of a TikTok deploy, with no fix until the open-source maintainer patches it. With TikTool, protocol updates are handled on our managed servers. Your code sees nothing change; events keep arriving.
Bonus: Features TTLC Doesn't Have
Live Captions (Speech-to-Text)
AI-powered real-time transcription and translation for any TikTok LIVE stream. 50+ languages supported.
Unreal Engine Plugin
Native C++/Blueprint plugin for game integrations. Build TikTok-interactive games with zero Node.js.
Live Feed Discovery
Search and discover who's currently live on TikTok. Filter by language, region, and viewer count.
Python SDK
Full Python SDK available: pip install tiktok-live-api. Same API, same events, different language.
Ready to Migrate?
Get a free API key - no credit card needed. The Sandbox tier includes 2,500 requests/day and 15 WebSocket connections - free, development & evaluation only.