SDKsWASMEnterprise
Accept a call
Accept a call invitation and obtain room credentials with the WASM SDK.
After obtaining the original SignalingInvitation from OnReceiveNewInvitation, accept it with signalingAccept():
const { data: roomCredentials } = await openimsdk.signalingAccept({
opUserID: currentUserID,
invitation,
});opUserID is the current user performing the accept action. invitation must preserve the original roomID, inviter, invitees, and session type from the received invitation; do not reconstruct it.
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 merging remote state through Call events.
Was this page helpful?