Skip to main content
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:
string
required
User ID
integer
required
Online status
  • 0 - Offline
  • 1 - Online
integer
required
Device identifier
  • 0 - App (Android, iPhone, iPad devices)
  • 1 - Web (Browser, Web applications)
  • 2 - Desktop (Desktop applications)

Status Codes

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

  1. Batch Requests: Query multiple users in a single request to reduce API calls
  2. Caching: Cache online status for a short period to avoid excessive requests
  3. Real-time Updates: Combine with WebSocket events for real-time status updates
  4. UI Optimization: Update UI efficiently when status changes
  5. Privacy: Respect user privacy settings for status visibility