# IRPCSharedLinksPublic.DownloadSharedFile_Begin

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) > [Shared links (anonymous access)](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinksPublic/index.md)

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

Badges: `Vault API / standard` `write` `no session`

Starts downloading the file of a shared link, without logging in, and returns a download ID,
the file size and its MD5 checksum.

- **Service:** [Shared links (anonymous access)](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinksPublic/index.md) `MFiles.IRPCSharedLinksPublic`
- **gRPC method:** `/MFiles.IRPCSharedLinksPublic/DownloadSharedFile_Begin`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/download-shared-file_-begin`
- **Request:** [`DownloadSharedFile_BeginRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinksPublic/DownloadSharedFile_Begin/index.md#request)
- **Response:** [`DownloadSharedFile_BeginResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinksPublic/DownloadSharedFile_Begin/index.md#response)
- **Book and level:** Vault API, standard
- **Kind:** write
- **Session:** Not needed: the call can be made before logging in.
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

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

## Remarks

- No session is needed. For links shared with named visitors, pass the visitor values in
  `additional_data` (see the service overview).
- Then read the content with
  [DownloadSharedFile_ReadBlock](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinksPublic/DownloadSharedFile_ReadBlock/index.md),
  sending the same `vault` and `access_key`.
- The MD5 checksum is split in two: the 16 checksum bytes are the 8 bytes of `low_digest`
  followed by the 8 bytes of `high_digest`, each in little-endian order.
- Co-authoring links cannot be downloaded ("The parameter is incorrect.").

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

## Request: DownloadSharedFile_BeginRequest

> 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 |
|---|---|---|
| `vault` | `string` | The vault GUID. |
| `access_key` | `string` | The access key of the shared link. |
| `additional_data[]` | repeated [`NamedValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.NamedValue/index.md) | Optional named values; see [GetSharedLinkInfo](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinksPublic/GetSharedLinkInfo/index.md). |
| `additional_data[].key` | `string` | The name of the value. |
| `additional_data[].value` | [`TypedValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValue/index.md) | The value as a serialized bytearray. |
| `additional_data[].value.is_null_value` | `bool` | True if the value is empty. `data` is then unset. |
| `additional_data[].value.type` | [`Datatype`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.Datatype/index.md) | The data type of the value. |
| `additional_data[].value.data` | [`TypedValueUnion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValueUnion/index.md) | The value, in the member that matches `type`. Unset for an empty value. |

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

## Response: DownloadSharedFile_BeginResponse

> 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_id` | `int32` | The download session ID for [DownloadSharedFile_ReadBlock](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinksPublic/DownloadSharedFile_ReadBlock/index.md). |
| `file_size` | `int64` | The size of the file in bytes. |
| `low_digest` | `int64` | The first 8 bytes of the MD5 checksum, as a little-endian integer. |
| `high_digest` | `int64` | The last 8 bytes of the MD5 checksum, as a little-endian integer. |

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

## Related methods

- [DownloadSharedFile_ReadBlock](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinksPublic/DownloadSharedFile_ReadBlock/index.md): Reads one block of a file download started with DownloadSharedFile_Begin.
