# IRPCScanningAndOCR.GetScanningAndOCROptions

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Scanning and OCR](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScanningAndOCR/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScanningAndOCR/GetScanningAndOCROptions/

Badges: `Vault API / standard` `read` `session` `idempotent` `returns metadata structure version`

Gets whether scanning and client- and server-side OCR are enabled for the vault, and for
which file types.

- **Service:** [Scanning and OCR](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScanningAndOCR/index.md) `MFiles.IRPCScanningAndOCR`
- **gRPC method:** `/MFiles.IRPCScanningAndOCR/GetScanningAndOCROptions`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-scanning-and-ocroptions`
- **Request:** [`GetScanningAndOCROptionsRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScanningAndOCR/GetScanningAndOCROptions/index.md#request)
- **Response:** [`GetScanningAndOCROptionsResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScanningAndOCR/GetScanningAndOCROptions/index.md#response)
- **Book and level:** Vault API, standard
- **Kind:** read
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** yes
- **Returns metadata structure version:** yes (in the mfiles-metadata-version-bin trailer)
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Requires a vault session; no special vault rights.
- `allow_server_ocr` is true only when server OCR is enabled in the vault settings, the license
  includes OCR and the OCR engine could be started; otherwise the Begin methods fail with "OCR
  feature is disabled by license or settings.". `ocr_setup_error_code` is non-zero when the
  engine could not be started.
- `allowed_file_extensions` defaults to TIF, TIFF, JPG, JPEG and PDF.

<a id="request"></a>

## Request: GetScanningAndOCROptionsRequest

No fields.

<a id="response"></a>

## Response: GetScanningAndOCROptionsResponse

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `putf8szscanocrops` | [`ScanningAndOCROptions`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ScanningAndOCROptions/index.md) | The scanning and OCR options of the vault. See [ScanningAndOCROptions](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ScanningAndOCROptions/index.md). |
| `putf8szscanocrops.allow_scanning_from_clients` | `bool` | True if the whole client-side scanning feature is on. |
| `putf8szscanocrops.allow_client_ocr` | `bool` | True if the OCR feature is on for the client-side. |
| `putf8szscanocrops.allow_server_ocr` | `bool` | True if the OCR feature is on for the server-side. |
| `putf8szscanocrops.allowed_file_extensions[]` | repeated `string` | An array of file extensions (not including dot) for which scanning and OCR generation is allowed. |
| `putf8szscanocrops.ocr_setup_error_code` | `uint32` | OCR setup error code. |
| `putf8szscanocrops.ocr_options` | [`OCROptions`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.OCROptions/index.md) | Default options for OCR. |
| `putf8szscanocrops.ocr_options.languages[]` | repeated [`OCRLanguageType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.OCRLanguageType/index.md) | Languages/character sets/dictionaries to be used as recognition hints. Can be unset. |
| `putf8szscanocrops.ocr_options.ocr_automatic_language_detection` | `bool` | True if the OCR automatic language detection is to be used. |
