kick-api
Rust client for the Kick.com API.
Covers channels, users, chat, moderation, rewards, event subscriptions, and live chat over WebSocket. Handles OAuth 2.1 (PKCE) authentication and automatic retry on rate limits (429).
Installation
[]
= "0.1"
= { = "1", = ["full"] }
Quick Start: Live Chat
Read live chat messages from any channel in real time — no authentication required.
use LiveChatClient;
async
You can also connect directly by chatroom ID if you already know it:
let mut chat = connect.await?;
Use next_event() instead of next_message() to receive all Pusher events (subscriptions, bans, polls, etc.).
Requirements
connect_by_username requires curl to be available on the system PATH. This is pre-installed on Windows 10+, macOS, and virtually all Linux distributions. If you prefer not to depend on curl, use connect(chatroom_id) with a known chatroom ID instead.
REST API (Authenticated)
All REST endpoints require an OAuth token. See Authentication below.
use KickApiClient;
async
API Coverage
| Module | Methods | Auth Required |
|---|---|---|
| Live Chat | connect_by_username, connect, next_message, next_event, send_ping, close |
No |
| Channels | get, get_mine |
Yes |
| Users | get, get_me, introspect_token |
Yes |
| Chat | send_message, delete_message |
Yes |
| Moderation | ban, unban |
Yes |
| Rewards | get_all, create, update, delete, manage_redemptions |
Yes |
| Events | list, subscribe, unsubscribe |
Yes |
OAuth Scopes
| Scope | Used By |
|---|---|
channel:read |
channels().get(), channels().get_mine() |
user:read |
users().get(), users().get_me(), users().introspect_token() |
chat:write |
chat().send_message() |
moderation:chat_message:manage |
chat().delete_message() |
moderation:ban |
moderation().ban(), moderation().unban() |
channel:rewards:read |
rewards().get_all() |
channel:rewards:write |
rewards().create(), rewards().update(), rewards().delete(), rewards().manage_redemptions() |
events:subscribe |
events().list(), events().subscribe(), events().unsubscribe() |
Authentication
Kick uses OAuth 2.1 with PKCE. You'll need a Kick Developer App to get your client ID and secret.
use ;
async
Token Refresh
let new_token = oauth.refresh_token.await?;
Token Revocation
oauth.revoke_token.await?;
Examples
Run the included examples:
# Read live chat (no auth needed)
# Get channel info (requires KICK_TOKEN env var)
KICK_TOKEN=your_token
Testing
# Unit tests (fast, no network)
# Integration tests (connects to real Kick WebSocket)
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.
Disclaimer
Unofficial library, not affiliated with Kick.com.