Skip to main content
Request permission to access the device’s camera and microphone. This method triggers a permission dialog in the host app and stores the user’s preference so they won’t be asked again for the same mini app.
This is an experimental feature that stores camera and microphone permission settings per mini app. The stored preference ensures users aren’t repeatedly prompted for the same permissions. Check the features.cameraAndMicrophoneAccess flag in the SDK context to determine if permissions have been granted.

Platform Support

On Android, camera and microphone permissions work slightly differently than iOS. Once permissions are granted to the host app, mini apps may have access without additional prompts. This is standard behavior for Android WebView permissions.
Camera and microphone access is not supported in web mini apps. The action will always reject on web platforms.

Usage

Return Value

Returns a Promise<void> that:
  • Resolves when the user grants permission
  • Rejects when the user denies permission or dismisses the dialog

Feature Detection

Before using this action, check if it’s supported:

Permissions

  • The permission dialog will only be shown once per mini app - the user’s choice is stored
  • If the user has previously granted or denied permissions, the stored preference is used and the promise will immediately resolve or reject without showing a dialog
  • The stored permissions ensure users aren’t repeatedly asked for the same access
  • Users can revoke permissions at any time by:
    1. Opening the mini app
    2. Tapping the options menu (three dots)
    3. Toggling the camera and microphone access switch

Example: Video Recording