Browse SDKs · React Native
Platform
SDKsReact Native

Get user profiles

Batch retrieve public profile information for specified user IDs using the OpenIM React Native SDK.

Copy

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

ParameterTypeRequiredDescription
userIDListstring[]YesArray of OpenIM user IDs to query. Deduplicate and limit batch sizes in application code.

Return value

Resolves to an array of PublicUserItem[]:

FieldTypeDescription
userIDstringOpenIM user ID and primary reconciliation key.
nicknamestringPublic account nickname.
faceURLstringPublic avatar image URL.
exstringCustom 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.