BUILT FOR JAVASCRIPT
JavaScript
Chat SDK
Build web messaging with Tencent RTC’s JavaScript Chat SDK. Connect messages, media, and groups to your own browser interface.
DEVELOPER RESOURCES
JavaScript Chat SDK Docs & Examples
Integration Guides
Install the JavaScript Chat SDK and send a test message.
Examples & Source
Explore the messaging experience and the official developer resources.
Conversations in your workspace
Keep project files and decisions together in a chat experience built for your browser.
A place for your community
Bring members together with group conversations that belong inside your product.
JAVASCRIPT CHAT CAPABILITIES
Messaging foundations for your product
Direct conversations
- One-to-one messages
- Your own interface
Group messaging
- Shared conversations
- Membership APIs
Rich messages
- Text and media
- Custom application content
Conversation state
- History and unread counts
- Your application store
User identity
- Your own user IDs
- UserSig authentication
App integration
- JavaScript APIs
- Platform-specific lifecycle
Explore the JavaScript Chat APIs
Start with the APIs that connect your application.
Start with your users
Create a Chat instance and connect an authenticated user.
Read the Documentationimport TencentCloudChat from '@tencentcloud/lite-chat';
const chat = TencentCloudChat.create({ SDKAppID });
await chat.login({ userID, userSig });Turn input into a conversation
Send text after SDK_READY, then render message state in your own interface.
Read the Documentationconst message = chat.createTextMessage({
to: recipientID,
conversationType: TencentCloudChat.TYPES.CONV_C2C,
payload: { text: 'See you there!' },
});
await chat.sendMessage(message);Keep your interface in sync
Listen for incoming messages and remove the handler when it is no longer needed.
Read the Documentationchat.on(TencentCloudChat.EVENT.MESSAGE_RECEIVED, onMessages);
// When your subscription ends:
chat.off(TencentCloudChat.EVENT.MESSAGE_RECEIVED, onMessages);CUSTOMIZATION
Your experience. Your way.
Build your own interface around connected conversations.
Your product, your interface
Build your own conversation list, message bubbles, and composer around SDK events.
Read the DocumentationMake messages useful
Render your application data as invitations or product cards with custom messages.
Read the DocumentationGET STARTED
Your first conversation starts here
- 01
- 02
Add the JavaScript Chat SDK
Follow the platform guide to connect your project.
Follow the Integration Guide - 03
npm install @tencentcloud/lite-chatimport TencentCloudChat from '@tencentcloud/lite-chat';
const chat = TencentCloudChat.create({ SDKAppID });
await chat.login({ userID, userSig });JavaScript Chat SDK FAQs
Which JavaScript SDK edition should I use?
The V4 package offers Basic, Standard, and Professional editions. The default import is Standard. Choose the edition and plugins for your required features; V3 integrations have a separate guide.
Does the JavaScript Chat SDK include a ready-made UI?
The SDK supplies messaging APIs and events. Your application builds the chat screens. The illustrations show possible app experiences.
How do I authenticate users of the JavaScript Chat SDK?
Generate production UserSig on your backend. Pass it to the client for authentication and keep your application secret on the server.
Are these JavaScript snippets a complete application?
They show individual integration steps. Follow the full guide for imports, initialization, login, error handling, and target-specific configuration. Test messaging with separate accounts before release.
How is JavaScript Chat SDK usage priced?
Hosted Chat service usage follows your selected plan. Check the included features and allowances for your application; optional plugins and Call services can have separate requirements.
How do I integrate JavaScript Chat SDK with JavaScript?
Initialize the documented JavaScript package with authenticated users. Subscribe to SDK readiness and message events, and remove listeners when the corresponding view ends.
How do I test JavaScript Chat SDK before releasing my app?
Check login, SDK readiness, send and receive events, and message state after reconnecting.
How do I customize the interface for JavaScript Chat SDK?
Build your own conversation list, message rendering and composer around documented SDK events.
Find support for your next step
Talk about your application
Discuss your product, expected usage, and integration needs.
Contact SalesBuild your next conversation
Build your app with the JavaScript Chat SDK.

