MDN Web Docs: Permissions API
Documents browser permission status querying, prompt state, API-triggered permission prompts, manual revocation through browser settings, and permission-aware APIs such as geolocation, camera, microphone, notifications, clipboard, sensors, and storage access.
What this source can teach
Use this source to understand a platform convention and the setting it was designed for.
- Start with the original. Open the source and find the guidance or example relevant to your task.
- Trace the connection. Use the claim notes below to see how this site applies the source to specific patterns.
- Check the setting. Compare the source's platform, people, and constraints with your own decision.
Pattern Decisions This Source Supports
| Pattern | Supported decision | Required contract | Claim note |
|---|---|---|---|
| Camera capture | Choose camera capture when the product must create new camera media and users need live preview, framing, capture, review, and retake behavior. | The camera stream starts only after a deliberate user action and contextual permission rationale. | Supports permission-aware camera access and revocation states. |
| Location permission flow | Choose location permission flow when current device coordinates are the central interaction and the task needs permission timing, precision, grant or denial recovery, and location lifecycle states. | The native browser or OS prompt appears only after users understand why location is needed and choose a location-dependent action. | Supports permission state queries for geolocation and prompt, granted, and denied states. |
| Permission prompt with no context | Flag this anti-pattern when a permission prompt appears before the user starts a resource-dependent feature or before the interface explains why the resource is needed now. | The product must not invoke the platform prompt from page load, app launch, passive onboarding, timers, or unrelated navigation. | Supports browser permission status checks, prompt state, API-specific prompt triggers, manual revocation, and device-resource examples. |
| Permission request | Choose permission request when the user is authorizing an OS, browser, or device resource such as camera, microphone, location, photos, contacts, notifications, clipboard, Bluetooth, motion sensors, storage access, or another powerful feature. | The product evaluates whether permission is truly needed before declaring or requesting the platform permission. | Supports browser permission status checks, prompt state, API-specific prompt triggers, manual revocation through settings, and examples of permission-aware APIs including geolocation, camera, microphone, notifications, clipboard, sensors, and storage access. |
| QR scan | Choose QR scan when decoding a code and acting on the decoded payload is the central task. | Scanning starts only after users choose a QR-dependent task and can see purpose, fallback, and privacy impact. | Supports permission-state handling around camera access. |
Comparisons supported by this source
- Camera capture vs file upload vs permission request vs sensitive-data reveal vs full-screen takeover vs drag-and-drop upload
Supports permission state awareness for camera access.
- Location permission flow vs permission request vs map view vs address entry vs privacy settings vs offline state
Supports querying geolocation permission state and handling granted, denied, and prompt states.
- Permission prompt with no context vs permission request vs location permission flow vs consent prompt vs permission denied state vs notification preferences
Supports browser prompt states, API-specific prompt behavior, permission queries, and revocation through browser settings.
- Permission request vs consent prompt vs permission sharing vs permission recovery vs permission denied state vs notification preferences
Supports browser prompt state, permission query behavior, API-specific prompt triggers, revocation through browser settings, and device-resource examples.
Evidence Role
This source is treated as platform-guideline evidence. Its value comes from the specific claims and setting described above.
Publisher: MDN Web Docs. Last checked: .