Get user profiles
Batch retrieve public profile information for specified user IDs using the OpenIM React Native SDK.
Batch retrieve public profile details for multiple user IDs, useful when rendering user cards, member lists, or stranger profiles.
When searching users by nickname, phone number, organization, or email, perform the query through your business backend first, then supply the matched user IDs to this method.
const userIDList = Array.from(new Set(['user_a', 'user_b']));
const users = await OpenIMSDK.getUsersInfo(userIDList);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
userIDList | string[] | Yes | Array of OpenIM user IDs to query. Deduplicate and limit batch sizes in application code. |
Return value
Resolves to an array of PublicUserItem[]:
| Field | Type | Description |
|---|---|---|
userID | string | OpenIM user ID and primary reconciliation key. |
nickname | string | Public account nickname. |
faceURL | string | Public avatar image URL. |
ex | string | Custom account-level extension string. |
The returned array is not guaranteed to preserve the positional order of the input ID array. Missing entries indicate users not found on the server.
This method returns public data for other users. To manage the profile of the authenticated user, see Get current user profile and Update current user profile.
Was this page helpful?