# IRPCWOPIOperationsPublic.WOPIFileCheckOut

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

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

Checks out the object of a read-only WOPI user session and turns the session into an editing
session.

- **Service:** [WOPI operations (anonymous)](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/index.md) `MFiles.IRPCWOPIOperationsPublic`
- **gRPC method:** `/MFiles.IRPCWOPIOperationsPublic/WOPIFileCheckOut`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/wopifile-check-out`
- **Request:** [`WOPIFileCheckOutRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/WOPIFileCheckOut/index.md#request)
- **Response:** [`WOPIFileCheckOutResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/WOPIFileCheckOut/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.** M-Files clients call it when the user switches from viewing to
editing in Office for the web. Applications should not call it.
- Changes the object: checks it out to the user of the session that created the token, creates a
  `SHARED_LINK_TYPE_WOPIEDIT` link to the new version and points the WOPI user session at it.
- Works only for a session created with `WOPIACTION_TYPE_VIEW`; other sessions fail with access
  denied.

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

## Request: WOPIFileCheckOutRequest

> 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 |
|---|---|---|
| `key` | `string` | The WOPI user session token. |

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

## Response: WOPIFileCheckOutResponse

No fields.
