Browse SDKs · uni-app / uni-app x
SDKsuni-app

Send a friend request

Send a friend request to another user.

Copy
import { addFriend } from '@/uni_modules/unix-openim-sdk'

await addFriend({ toUserID: 'user_b', reqMsg: 'Hello, I am Alice', ex: '' })

reqMsg is visible to the recipient. Keep tokens, internal permissions, and sensitive data out of both it and ex. Promise completion means the request was submitted, not accepted; refresh the sent-request list for its later status.