Browse SDKs · React Native
SDKsReact Native

Reject a friend application

Reject a friend request with the OpenIM React Native SDK.

Copy

Call refuseFriendApplication() to reject a friend request.

await OpenIMSDK.refuseFriendApplication({
  toUserID: applicantUserID,
  handleMsg: '',
});

Parameter description

ParameterTypeRequiredDescription
toUserIDstringYesUser ID of the applicant.
handleMsgstringYesMessage attached when handling the request. Pass an empty string when there is no message.

For request status changes, see the listener examples in Get received friend requests.