User overview
Understand user profiles, account settings, and presence subscriptions in the OpenIM React Native SDK.
The OpenIM React Native SDK uses userID as the unique user identifier. User APIs allow applications to read and modify current user settings, query public profile cards for arbitrary users, and subscribe to real-time online presence states.
Friendship relationships, friend requests, and blacklists are managed as part of relationship capabilities; see Relationships overview.
User data structures
The SDK exposes distinct models tailored to specific user contexts:
| Structure | Context | Applicable guides |
|---|---|---|
SelfUserInfo | Current authenticated user's profile, avatar, nickname, and account-level notification settings | Get current user profile, Update current user profile |
PublicUserItem | Public user profile cards for arbitrary users | Get user profiles |
UserOnlineState | Presence states and active platform client lists | Subscribe to user online status, Get subscribed user status, Unsubscribe from user online status |
SelfUserInfo belongs strictly to the local signed-in user, whereas PublicUserItem represents searchable public profile cards. Friendship metadata, blacklist statuses, and group membership roles are tracked via dedicated relationship and group models.
Browse by task
| Task | Recommended guide |
|---|---|
Query public profile cards by userID | Get user profiles |
| Read or update current user nickname, avatar, or extensions | Get current user profile, Update current user profile |
| Configure account-wide message reception policy | Set global message reception |
| Control friend request acceptance policy | Set friend add permission |
| Subscribe, query, and cancel online presence | Subscribe to user online status, Get subscribed user status, Unsubscribe from user online status |
| Manage friends, applications, and blacklists | Relationships overview |
Event listeners
User profile and presence updates trigger realtime push events:
- Current user profile mutations trigger
OnSelfInfoUpdated, documented in Update current user profile. - Online presence changes trigger
OnUserStatusChanged, documented in Subscribe to user online status. - Friendship, application, and blacklist events are detailed in Relationships overview.
Was this page helpful?