Browse SDKs · React Native
SDKsReact Native

Get friend profiles

Get specified friend profiles with the OpenIM React Native SDK.

Copy

Call getSpecifiedFriendsInfo() to retrieve relationship information for specified user IDs.

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

Parameter description

ParameterTypeRequiredDescription
userIDListstring[]YesUser IDs to retrieve.
filterBlackbooleanNoWhether to filter out blocked users.

The method returns matching FriendUserItem[]; the array is not guaranteed to follow the order of the input IDs. See Get the friend list for field descriptions.

For public information about users who are not your friends, use Get user profiles.