Documentation Index
Fetch the complete documentation index at: https://wukong.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Concept Explanation
What is a Device?
A Device is the terminal carrier for users to access the WuKongIM system, representing the specific device used by users to send and receive messages. Each device has a unique identifier and type, supporting users to simultaneously use instant messaging services on multiple devices.Why are Devices Important?
- Multi-device Sync: Users can log in simultaneously on multiple devices like phones, computers, and tablets with real-time message synchronization
- Device Management: Can view and manage all user login devices, supporting remote device logout
- Push Strategy: Adopt different message push strategies based on device type
Relationship with Other Concepts
- User: A user can own multiple devices, each device is associated with a user ID
- Message: Messages are synchronized to all online devices of the user
- Connection: Each device has an independent network connection
Core Structure
Devices contain the following core attributes:| Attribute | Type | Description |
|---|---|---|
cid | integer | Connection unique identifier |
uid | string | User ID that owns the device |
device_id | string | Device unique identifier |
device_flag | integer | Device type identifier |
uptime | string | Online duration |
idle | string | Idle time |
Device Example
Related API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/user/device_quit | POST | Force device offline |
/connz | GET | View connection information |
Device Type Identifiers
| Identifier Value | Device Type | Description |
|---|---|---|
| 0 | App | Android, iPhone, iPad devices |
| 1 | Web | Browser, Web applications |
| 2 | Desktop | Desktop applications |
EasySDK Code Examples
Device Initialization and Configuration
Multi-device Synchronization
Important Note: EasySDK automatically handles message synchronization between multiple devices. When a user logs in on multiple devices, messages are automatically synchronized to all online devices.
Device Management
A user can be online on multiple devices simultaneously. EasySDK automatically handles message synchronization between multiple devices. Each device has an independent connection and device identifier.

