IRPCWOPIOperationsPublic.GetWOPIUserSession
Server integration API / specialized internal: not for applications write no session
Gets the details of a WOPI user session: the shared object and file version, the action, the user and whether editing is allowed.
| Service | WOPI operations (anonymous) MFiles.IRPCWOPIOperationsPublic |
|---|---|
| gRPC method | /MFiles.IRPCWOPIOperationsPublic/GetWOPIUserSession |
| HTTP (mf-http-grpc) | POST /grpc/v1/get-wopiuser-session |
| Request | GetWOPIUserSessionRequest |
| Response | GetWOPIUserSessionResponse |
| 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) |
Remarks
For M-Files components only. The M-Files WOPI service calls it to validate each request from Office for the web, and M-Files Web calls it when it opens the editor page. Applications should not call it.
- Extends the expiration of the WOPI user session to 30 minutes (the default) from now.
- With a container access token (
typeWOPITOKEN_TYPE_WOPICONTAINER_TOKEN) andobjidandfile_id, it finds or creates a WOPI user session for that file; creating one checks the object out to the token's user and fails if the object is checked out to another user or computer.
Request: GetWOPIUserSessionRequest
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 |
|---|---|---|
pwszkey | string | The token, of the kind that type names. |
type | WOPITokenType | WOPITOKEN_TYPE_WOPIVAULT_USER_SESSION_TOKEN (the default) or WOPITOKEN_TYPE_WOPICONTAINER_TOKEN.Values: WOPITOKEN_TYPE_WOPIVAULT_USER_SESSION_TOKEN (0), WOPITOKEN_TYPE_ONE_TIME_TOKEN (1), WOPITOKEN_TYPE_WOPICONTAINER_TOKEN (2). |
objid | ObjID | The object; used only with a container access token. |
objid.type | int32 | The object type ID, for example 0 for documents. In a lookup value, the value list ID (for a lookup to objects, the object type ID). |
objid.item_id | ItemID | The ID of the object within its type, in item_id.internal_id. |
objid.item_id.internal_id | int32 | The ID of the object or value list item. |
objid.item_id.external_repository_id | ExternalRepositoryID | Used only for objects in external repositories (external connectors). Leave it unset for objects stored in the vault. |
file_id | int32 | The file ID; used only with a container access token. |
Response: GetWOPIUserSessionResponse
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 | WOPIUserSession | The session. is_edit_allowed is false when the user's license is read-only, the user lacks edit access, the object is deleted or has no editable files, an older version is shared, or the object is checked out to someone else (except in co-authoring). is_coauthor is true for the user who started co-authoring; is_shared_file for the other co-authors. |
wopi_user_session.wopi_user_session_key | string | The WOPI vault user session key. |
wopi_user_session.wopi_accesskey | string | The access of the shared file. |
wopi_user_session.action_type | WOPIActionType | The WOPI Action type.Values: WOPIACTION_TYPE_VIEW (0), WOPIACTION_TYPE_EDIT (1), WOPIACTION_TYPE_COAUTHORING (2). |
wopi_user_session.user_account_id | uint32 | The user ID. |
wopi_user_session.user_account_name | string | The user Account Name. |
wopi_user_session.external_username | string | The External user name. |
wopi_user_session.additional_data | WOPIClientAdditionalData | WOPI Client Additional data. |
wopi_user_session.additional_data.return_uri | string | The Return URL. |
wopi_user_session.additional_data.main_app_url | string | The Main Appp URL. |
wopi_user_session.additional_data.wopi_end_point | string | The WOPI Endpoint. |
wopi_user_session.additional_data.culture_identifier | string | The Culture identifier. |
wopi_user_session.additional_data.action_url | string | The action URL. |
wopi_user_session.additional_data.host_edit_url | string | The Host edit URL. |
wopi_user_session.obj_ver | ObjVer | The ObjVer of the object. |
wopi_user_session.obj_ver.obj_id | ObjID | The object. |
wopi_user_session.obj_ver.version | ObjVerVersion | The version. Usually OBJ_VER_VERSION_TYPE_SPECIFIC with internal_version. |
wopi_user_session.file_ver | FileVer | The FileVer of the object. |
wopi_user_session.file_ver.file_id | FileID | The file. |
wopi_user_session.file_ver.type | FileVerType | FILE_VER_TYPE_SPECIFIC for a file version number.Values: FILE_VER_TYPE_UNINITIALIZED (0), FILE_VER_TYPE_LATEST (1), FILE_VER_TYPE_ANY (2), FILE_VER_TYPE_SPECIFIC (3). |
wopi_user_session.file_ver.internal_version | int32 | The file version number. |
wopi_user_session.file_ver.external_repository_version | string | Used only for files in external repositories. Leave empty. |
wopi_user_session.file_ver.external_repository_sort_key | int64 | Used only for files in external repositories. Leave 0. |
wopi_user_session.is_shared_file | bool | Specifies the Shared file. |
wopi_user_session.is_coauthor | bool | Specifies the Co-authored file. |
wopi_user_session.csrftoken | string | The CSRF Token. |
wopi_user_session.onetimetoken | string | The One Time Token. |
wopi_user_session.is_edit_allowed | bool | Specifies whether the file can be edited or not. |
wopi_user_session.client_type | ClientType | The client type (user agent) identifier. |
Related methods
- GetWOPIUserSessionKey -- Exchanges a one-time token for the WOPI user session token it stands for.