User Management
Get User Online Status
Get online status information for multiple users
POST
Overview
Get online status information for multiple users, including whether they are online and device type.Request Body
The request body is an array of user ID strings:Response Fields
The response is an array, each element contains the following fields:User ID
Online status
0- Offline1- Online
Device identifier
0- App (Android, iPhone, iPad devices)1- Web (Browser, Web applications)2- Desktop (Desktop applications)
Status Codes
| Status Code | Description |
|---|---|
| 200 | Successfully retrieved user online status |
| 400 | Request parameter error |
| 500 | Internal server error |
Use Cases
Contact List Status
Display online status indicators in contact lists:Group Member Status
Check online status of group members:Presence Indicators
Implement presence indicators in chat interfaces:Best Practices
- Batch Requests: Query multiple users in a single request to reduce API calls
- Caching: Cache online status for a short period to avoid excessive requests
- Real-time Updates: Combine with WebSocket events for real-time status updates
- UI Optimization: Update UI efficiently when status changes
- Privacy: Respect user privacy settings for status visibility

