TikSync Go SDK
TikTok Live SDK for Go - Real-time chat, gifts, likes, follows & viewer events.
Website - Documentation - Pricing
Installation
go get github.com/tiksync/tiksync-go
Quick Start
package main
import (
"fmt"
tiksync "github.com/tiksync/tiksync-go"
)
func main() {
client := tiksync.New("username", "your_api_key")
client.On("chat", func(data map[string]interface{}) {
fmt.Printf("[%s] %s\n", data["uniqueId"], data["comment"])
})
client.On("gift", func(data map[string]interface{}) {
fmt.Printf("%s sent %s x%v\n", data["uniqueId"], data["giftName"], data["repeatCount"])
})
client.On("follow", func(data map[string]interface{}) {
fmt.Printf("%s followed!\n", data["uniqueId"])
})
client.Connect()
}
Configuration
client := tiksync.NewWithConfig("username", tiksync.Config{
APIKey: "your_api_key",
APIURL: "https://api.tik-sync.com",
MaxReconnectAttempts: 5,
ReconnectDelay: 5 * time.Second,
})
Events
| Event |
Description |
connected |
Connected to stream |
chat |
Chat message received |
gift |
Gift received (with diamond count, streak info) |
like |
Likes received |
follow |
New follower |
share |
Stream shared |
member |
User joined the stream |
roomUser |
Viewer count update |
streamEnd |
Stream ended |
disconnected |
Disconnected |
error |
Connection error |
Get Started
- Sign up at tik-sync.com
- Create a free API key in your dashboard
- Install the SDK and start building
Free tier available. See pricing for details.
Why TikSync?
- < 1ms signature latency
- $0 CAPTCHA cost
- Rust-powered native backend
- 6 official SDKs - JS, Python, Go, Java, C#, Rust
- Direct connection - no proxy required
License
MIT - Built by 0xwolfsync