SDKsWASMEnterprise
Accept a call
Accept a call invitation and obtain room credentials with the WASM SDK.
After obtaining the complete SignalingInvitation from OnReceiveNewInvitation, accept it with signalingAccept():
const { data: roomCredentials } = await openimsdk.signalingAccept({
opUserID: currentUserID,
invitation,
});opUserID is the current user accepting the call. Pass the complete invitation data received in the event as invitation, including its roomID, inviter, invitees, and session type. Do not reconstruct an object from only some of those fields.
When the Promise resolves, data is a SignalingAcceptResult containing roomID, token, and liveURL. Connect to the media room only after obtaining a valid token and roomID. Continue updating later remote state through Call events.
Was this page helpful?