Accept a call
OpenIM uni-app / uni-app x SDK guide for Accept a call.
import { signalingAccept } from '@/uni_modules/unix-openim-sdk'
const roomCredentials = await signalingAccept({ invitation })signalingAccept() is Commercial. Pass the original OpenIMSignalingInvitationInfo received from onReceiveNewInvitation; it must retain the room, inviter, invitees, and session type. Do not reconstruct it.
Validate the active SDK session and request microphone or camera permission before accepting. If permission is denied, do not send an accept request; reject the call or explain the failure according to the product flow.
Result
The Promise resolves to OpenIMSignalingAcceptResult | null:
| Field | Type | Description |
|---|---|---|
roomID | string or null | Media room identifier for this call. |
token | string or null | Short-lived credential used to join the room. |
liveURL | string or null | Media service connection address. |
invitation | OpenIMSignalingInvitationInfo or null | Invitation snapshot returned by the server. |
Keep these values only in memory. Join the media engine only after obtaining a valid roomID and token. Promise completion, remote signaling events, and an established media connection are separate phases; continue merging state through call events.
Was this page helpful?