# IRPCObjectOperations.DownloadFileWithDownloadKey

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) > [Objects, versions, properties and files](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/index.md)

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

Badges: `Vault API / core` `write` `session or assertion`

Not available over native gRPC: the server answers "Not implemented.". Used by the M-Files HTTP
gateway.

- **Service:** [Objects, versions, properties and files](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/index.md) `MFiles.IRPCObjectOperations`
- **gRPC method:** `/MFiles.IRPCObjectOperations/DownloadFileWithDownloadKey`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/download-file-with-download-key`
- **Request:** [`DownloadFileWithDownloadKeyRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFileWithDownloadKey/index.md#request)
- **Response:** [`DownloadFileWithDownloadKeyResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFileWithDownloadKey/index.md#response)
- **Book and level:** Vault API, core
- **Kind:** write
- **Session:** Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

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

## Request: DownloadFileWithDownloadKeyRequest

> 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 |
|---|---|---|
| `download_key` | [`StringValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.StringValue/index.md) | Contains identifier that will be used to locate the file. |
| `download_key.value` | `string` | String. |
| `format` | [`FileFormat`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FileFormat/index.md) | Specifies the file format to download. Values: `FILE_FORMAT_NATIVE` (0), `FILE_FORMAT_PDF` (1), `FILE_FORMAT_DISPLAY_ONLY_PDF` (2), `FILE_FORMAT_PLAIN_TEXT` (3), `FILE_FORMAT_MARKDOWN` (4). |
| `content_disposition_inline` | `bool` | True if the content is expected to be displayed inline in the browser. |
| `need_checksum` | `bool` | True if the caller wants to receive the checksum of the file. Will be returned in the response headers. |

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

## Response: DownloadFileWithDownloadKeyResponse

No fields.

<a id="related"></a>

## Related methods

- [DownloadFile](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFile/index.md): Not available over native gRPC: the server answers "Not implemented.". Used by the M-Files HTTP gateway.
