POST /webcast/ws_credentials
Get pre-signed WebSocket connection credentials for establishing a direct connection to TikTok’s live stream WebSocket servers. Returns everything needed to connect without using the managed proxy.
What’s returned: A signed websocket_url (with X-Bogus), cookies (ttwid, session), user_agent, room_id, and cluster_region. Use these to create your own WebSocket connection directly to TikTok.
When to use: Advanced users building custom WebSocket clients who need direct TikTok connections (bypassing our proxy). Most users should use the managed WebSocket connection (wss://api.tik.tools) or the Node.js SDK instead.
Important: Direct connections count toward TikTok’s per-IP WebSocket limit (~4 concurrent). If you need more, use our managed proxy which distributes connections across multiple IPs.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
unique_id | string | Yes | TikTok username |