This project contains 7 usage samples for the @nexconn/chat SDK, covering the following scenarios:
Chat Growth Credit — Build with Nexconn Chat and explore full capabilities free up to 10,000 MAU. View the offer details →
- Initialize and connect Chat SDK
- Send a text message in Direct Channel
- Send a file message in Direct Channel
- Create Group Channel and send a text message in Group Channel
- Get recent Direct and Group Channel list
- Set Do Not Disturb for Direct and Group Channel
- Get Group Channel member info
Open config.ts and replace the following values with your own.
npm installnpm run devOpen the dev server URL in your browser (default http://localhost:5173), open DevTools Console (F12), then click the buttons on the page to run each sample.
Note: Please run Sample 1 first to initialize and connect the SDK before running other samples.
├── config.ts # Configuration (AppKey, Token, etc.)
├── index.html # Browser entry page
├── index.ts # Main entry, binds button events
├── samples/
│ ├── 01-init-and-connect.ts # Sample 1: Initialize and connect
│ ├── 02-send-text-in-direct.ts # Sample 2: Send text in Direct Channel
│ ├── 03-send-file-in-direct.ts # Sample 3: Send file in Direct Channel
│ ├── 04-create-group-and-send.ts # Sample 4: Create Group and send message
│ ├── 05-get-channel-list.ts # Sample 5: Get Channel list
│ ├── 06-set-no-disturb.ts # Sample 6: Set Do Not Disturb
│ └── 07-get-group-members.ts # Sample 7: Get Group member info
├── package.json
└── README.md