WuKongIM Docs

JavaScript / Web

Use TypeScript to connect wukongimjssdk and manage WebSocket, messages, conversations, and channel profiles.

wukongimjssdk is the full WuKongIM JavaScript SDK. It manages WebSocket, message delivery, an in-memory conversation list, and channel profiles for browsers, H5, and separately verified JavaScript runtimes.

These guides target wukongimjssdk 1.3.5 and use TypeScript throughout.

Before you start

Prepare:

  • a WuKongIM WebSocket endpoint reachable from the target runtime;
  • two test users, such as alice and bob;
  • a uid, token, and ws:// or wss:// endpoint returned by your application server;
  • a frontend project using npm, pnpm, or Yarn.

The browser must not hold an admin secret

The browser should receive only the current user's short-lived token and endpoint from your application server. Keep user creation, token issuance, and access control on the server.

The repository contains a runnable two-session example at docs-site/examples/javascript-web-quickstart. Read these guides to learn the API first; run the example when you are ready to connect a real service.

Read Core Concepts first if “channel” or “conversation” is unfamiliar. Open the API Reference when you only need a method name.

On this page