# IRPCWOPIOperationsPublic.EndWOPIUserSession

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

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

Ends a WOPI user session: its token stops working at once.

- **Service:** [WOPI operations (anonymous)](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/index.md) `MFiles.IRPCWOPIOperationsPublic`
- **gRPC method:** `/MFiles.IRPCWOPIOperationsPublic/EndWOPIUserSession`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/end-wopiuser-session`
- **Request:** [`EndWOPIUserSessionRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/EndWOPIUserSession/index.md#request)
- **Response:** [`EndWOPIUserSessionResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/EndWOPIUserSession/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 to end a WOPI user session that they
created. Applications should not call it.
- Sets the expiration time of the WOPI user session to now. It does not check the object in.

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

## Request: EndWOPIUserSessionRequest

> 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: EndWOPIUserSessionResponse

No fields.
