Quick Reference for AI Agents & Developers
Core Concepts
- UID: Unique identifier for each user (typically matches your database user ID)
- User Object: Contains profile info like name, avatar, status, and metadata
- Presence: Real-time online/offline status
Quick Start
Get Current User
- JavaScript
- Async/Await
Fetch Users
- JavaScript
- Async/Await
User Management
Retrieve Users
Fetch user lists with filtering and search
User Management
Create, update, and manage user profiles
Block Users
Block and unblock users
User Presence
Track online/offline status in real-time
User Object Properties
| Property | Method | Description | Editable |
|---|---|---|---|
| UID | getUid() | Unique identifier | No (set at creation) |
| Name | getName() | Display name | Yes |
| Avatar | getAvatar() | Profile picture URL | Yes |
| Status | getStatus() | online or offline | No (system managed) |
| Role | getRole() | User role for access control | Yes |
| Metadata | getMetadata() | Custom JSON data | Yes |
| Status Message | getStatusMessage() | Custom status text | Yes |
| Last Active | getLastActiveAt() | Last activity timestamp | No |
| Link | getLink() | Profile page URL | Yes |
| Tags | getTags() | Array of tags | Yes |
| Blocked By Me | getBlockedByMe() | If logged-in user blocked them | No |
| Has Blocked Me | getHasBlockedMe() | If they blocked logged-in user | No |
Common Use Cases
Build a Contacts List
- JavaScript
- Async/Await
Search Users
- JavaScript
- Async/Await
Filter Online Users
- JavaScript
- Async/Await
Filter by Role
- JavaScript
- Async/Await