Browse SDKs · React Native
Platform
SDKsReact Native

Get specified friends info

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

Copy

Batch retrieve friendship records for a list of target user IDs:

const friends = await OpenIMSDK.getSpecifiedFriendsInfo({
  userIDList: ['user_a', 'user_b'],
  filterBlack: true,
});

Parameters

ParameterTypeRequiredDescription
userIDListstring[]YesList of friend user IDs to retrieve.
filterBlackbooleanNoWhether to filter out blacklisted users; defaults to false.

Return value

Resolves to an array of matching FriendUserItem[]. The return order is not guaranteed to match the input list. For field definitions, see Get friend list by page.

To fetch public profile cards for users who are not friends, use Get user profiles.