Browse SDKs · React Native
SDKsReact NativeEnterprise

Accept a call

Accept a call invitation with OpenIM React Native SDK.

Copy

After receiving OnReceiveNewInvitation, call signalingAccept() to accept the call invitation.

const roomCredentials = await OpenIMSDK.signalingAccept({
  opUserID: currentUserID,
  invitation,
});

opUserID is the user ID of the user accepting the invitation. Use the complete invitation object provided by the OnReceiveNewInvitation event callback.

The call returns RtcInviteResults, which contains the call room's roomID, token, and liveURL. Other participants receive the acceptance through OnInviteeAccepted; use invitation.roomID in its callback to identify the call. For event listeners, see Handle call events.