SDKsReact Native
Send a friend application
Send a friend request with the OpenIM React Native SDK.
Call addFriend() to send a friend request to a specified user.
await OpenIMSDK.addFriend({
toUserID,
reqMsg,
});Parameter description
| Parameter | Type | Required | Description |
|---|---|---|---|
toUserID | string | Yes | User ID to add. |
reqMsg | string | Yes | Message attached to the request. Pass an empty string when there is no message. |
A successful call means that the friend request was submitted; it does not mean that the recipient has accepted it. For request status changes, see the listener examples in Get received friend requests.
Was this page helpful?