Browse SDKs · React Native
Platform
SDKsReact NativeEnterprise

Start a one-to-one call

Initiate a direct audio or video call using the OpenIM React Native SDK.

Copy

Initiate a direct one-to-one audio or video call. When the method resolves, use the returned room credentials (roomID, token, and liveURL) to connect your real-time audio/video media engine.

const roomCredentials = await OpenIMSDK.signalingInvite({
  invitation: {
    inviterUserID: currentUserID,
    inviteeUserIDList: [peerUserID],
    groupID: '',
    roomID,
    timeout: 30,
    mediaType: 'video',
    sessionType: SessionType.Single,
    platformID: currentPlatform,
  },
});

Parameters

ParameterTypeRequiredDescription
invitationRtcInviteYesCall invitation payload.
invitation.inviterUserIDstringYesUser ID of the caller initiating the call.
invitation.inviteeUserIDListstring[]YesList containing the recipient user ID for direct calls.
invitation.groupIDstringYesPass an empty string "" for direct one-to-one calls.
invitation.roomIDstringYesUnique identifier for this call room. Used in subsequent call operations and events.
invitation.timeoutnumberYesInvitation timeout duration in seconds.
invitation.mediaTypestringYesMedia stream type, such as 'audio' or 'video'.
invitation.sessionTypeSessionTypeYesPass SessionType.Single for direct calls.
invitation.platformIDPlatformYesPlatform enum value representing the caller's operating platform.
invitation.customDatastringNoOptional business extension string attached to the invitation.
invitation.initiateTimenumberNoInitiation timestamp in Unix milliseconds. Automatically generated if omitted.
invitation.busyLineUserIDListstring[]NoList of users currently on a busy line. Leave empty when initiating.
offlinePushInfoOfflinePushNoOffline push configuration when the recipient is offline.
offlinePushInfo.titlestringConditionalNotification title when offlinePushInfo is provided.
offlinePushInfo.descstringConditionalNotification body text when offlinePushInfo is provided.
offlinePushInfo.exstringConditionalCustom extra payload string. Pass empty string "" if not needed.
offlinePushInfo.iOSPushSoundstringConditionaliOS push sound file identifier.
offlinePushInfo.iOSBadgeCountbooleanConditionalWhether to increment the iOS application badge count.

Return value

Resolves to an RtcInviteResults object:

FieldTypeDescription
roomIDstringUnique identifier of the calling room.
tokenstringAuthentication token used by the media engine to enter the room.
liveURLstringEndpoint URL of the media server room.
busyLineUserIDListstring[]List of invited users currently occupied on another call.

The recipient receives an invitation notification via the OnReceiveNewInvitation event. Identify the active call session using roomID and combine roomID:userID to manage calling and connected states. For accept, reject, cancel, and hang-up flows, see Handle call events.