# IRPCWOPIOperationsPublic.WOPIDownloadFile_Begin

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Server integration API](https://developer.m-files.com/APIs/gRPC-API/integration/index.md) > [WOPI operations (anonymous)](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/index.md)

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

Badges: `Server integration API / specialized` `internal: not for applications` `write` `no session`

Starts downloading the file of a WOPI user session and returns its size and MD5 checksum.

- **Service:** [WOPI operations (anonymous)](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/index.md) `MFiles.IRPCWOPIOperationsPublic`
- **gRPC method:** `/MFiles.IRPCWOPIOperationsPublic/WOPIDownloadFile_Begin`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/wopidownload-file_-begin`
- **Request:** [`WOPIDownloadFile_BeginRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/WOPIDownloadFile_Begin/index.md#request)
- **Response:** [`WOPIDownloadFile_BeginResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/WOPIDownloadFile_Begin/index.md#response)
- **Book and level:** Server integration API, specialized
- **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

**For M-Files components only.** The M-Files WOPI service calls it when Office for the web
reads the file. Applications should not call it.
- The token's user needs read access to the object. Read the content with
  [WOPIDownloadFile_ReadBlock](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/WOPIDownloadFile_ReadBlock/index.md).

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

## Request: WOPIDownloadFile_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 |
|---|---|---|
| `wopi_user_session_key` | `string` | The WOPI user session token. |

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

## Response: WOPIDownloadFile_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 for `WOPIDownloadFile_ReadBlock`. |
| `file_size` | `int64` | The size of the file. |
| `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

- [WOPIDownloadFile_ReadBlock](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/WOPIDownloadFile_ReadBlock/index.md): Reads a block of the file of a WOPI download session.
