SDKsReact Native
Refuse a friend request
Decline an incoming friend application from a specified applicant with the OpenIM React Native SDK.
Decline an incoming friend request from a specified applicant:
await OpenIMSDK.refuseFriendApplication({
toUserID: applicantUserID,
handleMsg: '',
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
toUserID | string | Yes | User ID of the applicant who initiated the request. |
handleMsg | string | Yes | Rejection reason message. Pass empty string "" if not needed. |
Return value
A resolved Promise confirms that the refusal was recorded on the server.
Refusing a request emits the OnFriendApplicationRejected event on both users' clients. Update the status of the application entry in the friend request list. For event listener setup, see Get received friend applications.
Was this page helpful?