> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rebellapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# allowSystemSnapshot

> Allow or forbid screenshots and screen recordings.

Allows or forbids screenshots and screen recordings in the Mini Program. This JSAPI is invoked through `my.call`.

## Prerequisites

* Android: SuperApp version 2.59.2 or later
* iOS: SuperApp version 2.59.0 or later, on iOS 13 or later

## Parameters

| Property | Type | Required | Description |
| - | - | - | - |
| allow | Boolean | No | `true` (default) allows screenshots and screen recordings; `false` forbids them. Applies to the whole Mini Program except some system pages (e.g. about page, settings page, system pop-ups). When forbidden: on iOS, saved photos and videos are completely black; on Android, screenshots cannot be saved and screen recordings are black |
| success | Function | No | Callback on success |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |

## Error Codes

| Code | Description | Solution |
| - | - | - |
| 1 | Invalid JSAPI interface | Check whether your current runtime supports this JSAPI |
| 2 | Invalid JSAPI parameters | Check parameter types and that all required parameters are specified |

## Code Example

```javascript theme={null}
// Forbid screenshots on a page showing sensitive data
my.call('allowSystemSnapshot', {
  allow: false,
  success: (res) => {
    console.log('Screenshots disabled', res);
  },
  fail: (err) => {
    console.error(err);
  }
});
```

## Related APIs

> [card] [my.onUserCaptureScreen](https://docs.rebellapp.com/jsapi/device/capture-screen/my.onUserCaptureScreen.md)
>
> Listen for user screenshots

> [card] [my.offUserCaptureScreen](https://docs.rebellapp.com/jsapi/device/capture-screen/my.offUserCaptureScreen.md)
>
> Stop listening for screenshots


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.