Browse SDKs · HarmonyOS
Platform
SDKsHarmonyOSEnterprise

Reject call

Decline an unanswered incoming audio or video call invitation.

Copy

Supply the complete invitation payload along with the callee's participant metadata to reject an incoming call:

Code example

import sdk, { Platform, SignalingRejectReq } from '@openimsdk/imsdk';

const request: SignalingRejectReq = {
  invitation: invitation,
  offlinePush: offlinePush,
  participant: participant,
  opUserPlatformID: Platform.HarmonyOS,
  userID: invitation.inviterUserID,
};
await sdk.signalingReject(request);

Parameters

ParameterTypeRequiredDescription
invitationSignalingInvitationInfoYesThe complete call invitation object to reject.
offlinePushOfflinePushInfoYesPush notification options for offline participants.
participantSignalingParticipantMetaDataYesUser metadata of the rejecting participant.
opUserPlatformIDPlatformYesPlatform identifier of the rejecting device (Platform.HarmonyOS).
userIDstringYesUser ID of the inviter receiving the rejection signal.

Return value

Returns a Promise that resolves to void when the rejection signal is transmitted.

State changes after the call

Once the Promise resolves, dismiss the incoming call interface locally identified by roomID and release any reserved audio resources. The caller receives an invitation rejection event and updates UI accordingly. For remote event handling, see Handle call events.