# IRPCObjectOperations.GetFileDownloadUrl2

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/GetFileDownloadUrl2/

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/GetFileDownloadUrl2`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-file-download-url2`
- **Request:** [`GetFileDownloadUrlRequest2`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetFileDownloadUrl2/index.md#request)
- **Response:** [`GetFileDownloadUrlResponse2`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetFileDownloadUrl2/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: GetFileDownloadUrlRequest2

Request details for generating a download key for downloading multiple files.

> 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_requests[]` | repeated [`FileDownloadUrlRequestData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileDownloadUrlRequestData/index.md) | Download requests. |
| `download_requests[].obj_ver` | [`ObjVer`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVer/index.md) | The object version to download files from with the key. Not used if uploadID is not zero or fileRef is not empty. |
| `download_requests[].obj_ver.obj_id` | [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | The object. |
| `download_requests[].obj_ver.version` | [`ObjVerVersion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVerVersion/index.md) | The version. Usually `OBJ_VER_VERSION_TYPE_SPECIFIC` with `internal_version`. |
| `download_requests[].file_ids[]` | repeated [`FileID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileID/index.md) | File IDs in the object version to download with the key. Not used if uploadID is not zero or fileRef is not empty. |
| `download_requests[].file_ids[].type` | [`FileIDType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FileIDType/index.md) | `FILE_IDTYPE_SPECIFIC` for one file. Values: `FILE_IDTYPE_UNINITIALIZED` (0), `FILE_IDTYPE_ALL` (1), `FILE_IDTYPE_ANY` (2), `FILE_IDTYPE_SPECIFIC` (3). |
| `download_requests[].file_ids[].internal_id` | `int32` | The file ID. |
| `download_requests[].file_ids[].external_repository_id` | `string` | Used only for files in external repositories. Leave empty. |
| `download_requests[].upload_id` | `int32` | The identifier of the upload operation (from UploadTempFile or UploadTempFileCommit). If this is not zero, objVer and fileIds are ignored, and the download key is generated for downloading the file uploaded in the upload operation identified by this parameter. |
| `download_requests[].file_ref` | `string` | If not empty, the file_ref of a stateless upload ended with FileUploadEnd, and the download key is generated for downloading it; objVer and fileIds are ignored. At most one of uploadID and fileRef may be set. |
| `download_requests[].extension` | `string` | The extension of the file, not including the dot (e.g. "doc"). Used with fileRef only, as a file_ref has no file name. |

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

## Response: GetFileDownloadUrlResponse2

Response details for generating a download key for downloading multiple files.

> 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 |
|---|---|---|
| `url` | `string` | The download URL. |

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

## Related methods

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