# WOPITokenType

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Enums](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/index.md)

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

WOPI Token type enumeration.

- **Full name:** `MFiles.WOPITokenType`
- **Proto file:** [`mfiles/enums.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/enums.proto)

<a id="values"></a>

## Values

| Name | Number | Description |
|---|---|---|
| <a id="v-WOPITOKEN_TYPE_WOPIVAULT_USER_SESSION_TOKEN"></a>`WOPITOKEN_TYPE_WOPIVAULT_USER_SESSION_TOKEN` | 0 | The WOPI User Session Token. |
| <a id="v-WOPITOKEN_TYPE_ONE_TIME_TOKEN"></a>`WOPITOKEN_TYPE_ONE_TIME_TOKEN` | 1 | One Time Token. |
| <a id="v-WOPITOKEN_TYPE_WOPICONTAINER_TOKEN"></a>`WOPITOKEN_TYPE_WOPICONTAINER_TOKEN` | 2 | The WOPI Container Token. |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCWOPIOperations.CreateWOPIUserSession](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperations/CreateWOPIUserSession/index.md): Creates a WOPI user session for one file version and returns its token (or a one-time token that can be exchanged for it).
- [IRPCWOPIOperationsPublic.GetWOPIUserSession](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/GetWOPIUserSession/index.md): Gets the details of a WOPI user session: the shared object and file version, the action, the user and whether editing is allowed.

<a id="used-in-fields"></a>

## Used in fields

- [`CreateWOPIUserSessionRequest.type`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperations/CreateWOPIUserSession/index.md#request): `WOPITOKEN_TYPE_WOPIVAULT_USER_SESSION_TOKEN` (the default) returns the session token itself; `WOPITOKEN_TYPE_ONE_TIME_TOKEN` returns a one-time token, for passing in a URL. `WOPITOKEN_TYPE_WOPICONTAINER_TOKEN` is rejected.
- [`GetWOPIUserSessionRequest.type`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWOPIOperationsPublic/GetWOPIUserSession/index.md#request): `WOPITOKEN_TYPE_WOPIVAULT_USER_SESSION_TOKEN` (the default) or `WOPITOKEN_TYPE_WOPICONTAINER_TOKEN`.
