WOPI operations (IRPCWOPIOperations)
Creates the access tokens with which Office for the web (WOPI) opens vault files, and returns the Office for the web actions that the vault can use.
| gRPC service | MFiles.IRPCWOPIOperations |
|---|---|
| Book and level | Server integration API, specialized |
| Methods | 3 |
| Proto file | mfiles/IRPCWOPIOperations.proto |
Overview
For M-Files components only. M-Files clients call this service with the user's own vault session to hand a file over to Office for the web. Applications should not call it.
- Callers: M-Files Web and M-Files Desktop call CreateWOPIUserSession when the user opens a file in Office for the web or starts co-authoring, and GetWOPIDiscoveryData to learn which file types and actions are available. The M-Files WOPI service (the WOPI host that Office for the web talks to) calls CreateContainerAccessToken for the Office mobile apps.
- Tokens: a token is a Base64 string that holds the vault GUID and 64 random bytes. The server stores it with the session ID of the caller, and the anonymous methods of IRPCWOPIOperationsPublic act in that session. A token therefore stops working when the session that created it ends, even before the token itself expires.
- Session and rights: a vault session; no special vault rights. Access to the object is checked when the token is created and again on every file operation made with it.
- On a server where the WOPI service is turned off,
CreateWOPIUserSessionfails with "Not implemented." (0x80004001) andGetWOPIDiscoveryDatareturns an empty list.
Methods
| Method | Summary | Facts |
|---|---|---|
| CreateContainerAccessToken | Creates, or returns the existing, container access token with which the Office mobile apps browse a vault location through the M-Files WOPI service. | internal: not for applications write session |
| CreateWOPIUserSession | Creates a WOPI user session for one file version and returns its token (or a one-time token that can be exchanged for it). | internal: not for applications write session |
| GetWOPIDiscoveryData | Gets the Office for the web actions (action name and URL) that the vault's WOPI configuration provides. | internal: not for applications read session idempotent |