SDK v7.x · Last verified March 2026 · iOS · Android · Web
Speed run — just the code
Speed run — just the code
.png?fit=max&auto=format&n=Whepx2DgDzjvHcd8&q=85&s=911c718afff562d5c7e11f209656ab95)
Prerequisites:
- A room and livestream post already exist → Go Live & Room Management
- UIKit installed if using the pre-built components → UIKit Getting Started
Step 1: Create the Live Chat Channel
Create the channel after the room and livestream post exist. The channel needs both thepostId and roomId to be properly linked.
room.channelId.
Step 2: Add the Chat UI
Option A: UIKit (recommended)
Drop in a single component for a full chat experience — header with channel name + member count, scrolling message list, and compose bar with mentions and reactions.- iOS
- Android
- Web / React
AmityLiveChatPage bundles three sub-components you can also use individually:
| Component | What it does |
|---|---|
AmityLiveChatHeader | Channel name, avatar, live member count |
AmityLiveChatMessageList | Scrolling messages with copy, reply, delete, and flag actions |
AmityLiveChatMessageComposeBar | Text input with @mention suggestions, reply, and character limit |
Option B: Build with the SDK
If you need a fully custom UI, use the Chat SDK to send and observe messages directly.Step 3: Reactions
Live chat messages support emoji reactions to drive engagement during the stream.UIKit
TheAmityReactionList component renders reaction counts and user lists out of the box:
SDK
Add and remove reactions programmatically:Step 4: Viewer Count & Channel Info
The live chat channel exposes real-time metadata you can display alongside the stream:| Property | What it tells you |
|---|---|
channel.memberCount | Total members who joined the channel |
channel.metadata | Custom data (e.g., pinned announcement) |
Room watcherCount (via analytics) | Active viewers watching the stream |
AmityLiveChatHeader UIKit component renders member count automatically.
Step 5: Moderation
Flag messages
Flag messages
Any user can flag an inappropriate message. Flagged messages appear in the Admin Console for moderator review.
TypeScript
Delete messages (moderator)
Delete messages (moderator)
Community moderators and admins can hard-delete messages:
TypeScript
Ban users from chat
Ban users from chat
Remove disruptive users from the live chat channel:
TypeScript
AI content moderation
AI content moderation
Enable AI moderation in Admin Console → AI Content Moderation to auto-flag or auto-remove messages matching your policy. Works in real-time for live chat.→ AI Content Moderation
Common Mistakes
Best Practices
Layout: video + chat side by side
Layout: video + chat side by side
- On desktop/tablet, show chat in a right panel alongside the video player
- On mobile, use a bottom sheet or overlay that can be swiped away
- Keep the compose bar always visible — don’t hide it behind a tap
Performance at scale
Performance at scale
- Use UIKit’s
AmityLiveChatPagewhich is optimized for high-volume streams - If building custom, debounce re-renders and virtualize the message list
- Consider showing only the last 100 messages and lazy-loading history on scroll-up
Engagement features
Engagement features
- Pin an announcement message at the top of chat (use channel
metadata) - Show host and co-host messages with a distinct badge color
- Add a “slow mode” (rate limit) during peak moments to keep chat readable
Next Steps
Go Live & Room Management
Room creation, broadcast setup, and lifecycle management.
Co-Hosting
Invite co-hosts to share the stage during a broadcast.
Product Tagging
Pin products to the stream for live commerce.