Skip to main content

1. Get Your API Key

Sign up at tik.tools and get a free sandbox API key from the dashboard. No credit card required.

2. Install (Optional)

If using the Node.js SDK, install it via npm:
npm install @tiktool/live
Or use the WebSocket directly — no SDK required. Any language with WebSocket support works.

3. Connect

import { TikTokLive } from '@tiktool/live';

const client = new TikTokLive({
  apiKey: 'YOUR_API_KEY',
  uniqueId: 'streamer_username',
});

client.on('chat', (event) => {
  console.log(`${event.user.uniqueId}: ${event.comment}`);
});

client.on('gift', (event) => {
  console.log(`${event.user.uniqueId} sent ${event.giftName} (${event.diamondCount}💎)`);
});

client.on('connected', () => console.log('Connected!'));

await client.connect();

4. What’s Next?

WebSocket Events

See all 30+ event types you can receive.

REST API

Explore signing, room info, rankings, and more.

Live Captions

Add real-time AI transcription to any stream.

Authentication

Learn about API keys and JWT tokens for frontend use.