# IRPCWOPIOperationsPublic.WOPIDownloadFile_ReadBlock

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

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

Reads a block of the file of a WOPI download session.

- **Service:** [WOPI operations (anonymous)](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/index.md) `MFiles.IRPCWOPIOperationsPublic`
- **gRPC method:** `/MFiles.IRPCWOPIOperationsPublic/WOPIDownloadFile_ReadBlock`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/wopidownload-file_-read-block`
- **Request:** [`WOPIDownloadFile_ReadBlockRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/WOPIDownloadFile_ReadBlock/index.md#request)
- **Response:** [`WOPIDownloadFile_ReadBlockResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/WOPIDownloadFile_ReadBlock/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. Applications should not
call it.
- `download_id` must belong to a download started with the same token's link; otherwise the call
  fails with an invalid shared link error.

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

## Request: WOPIDownloadFile_ReadBlockRequest

> 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. |
| `download_id` | `int32` | The ID from [WOPIDownloadFile_Begin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/WOPIDownloadFile_Begin/index.md). |
| `block_size` | `uint32` | The number of bytes wanted. |
| `offset` | `int64` | The offset to start reading from. |

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

## Response: WOPIDownloadFile_ReadBlockResponse

> 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 |
|---|---|---|
| `data` | `bytes` | Receives the data block. |

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

## Related methods

- [WOPIDownloadFile_Begin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/WOPIDownloadFile_Begin/index.md): Starts downloading the file of a WOPI user session and returns its size and MD5 checksum.
