Skip to main content
accessState()

Return value

Returns a DailyAccessState object:
access
DailyAccess
The participant’s current access level. Either 'unknown' (not yet determined) or an object with a level field:
  • 'unknown' — access has not yet been determined (before preAuth() or join())
  • { level: 'none' } — the participant is not allowed to join
  • { level: 'lobby' } — the participant can join but will be in the waiting room until granted full access
  • { level: 'full' } — the participant has full access to the meeting
awaitingAccess
SpecifiedDailyAccess
Optional. Present when the participant has requested access that hasn’t yet been granted or denied. Always { level: 'full' }.

Example

const { access, awaitingAccess } = call.accessState();

if (access === 'unknown') {
  // Not yet joined or pre-authed
} else if (access.level === 'lobby') {
  showWaitingRoomUI();
  if (awaitingAccess) {
    showPendingAccessMessage();
  }
} else if (access.level === 'full') {
  showCallUI();
} else if (access.level === 'none') {
  showAccessDeniedMessage();
}

See also