IRPCWOPIOperationsPublic.GetWOPIUserSession

View as Markdown

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.

ServiceWOPI operations (anonymous) MFiles.IRPCWOPIOperationsPublic
gRPC method/MFiles.IRPCWOPIOperationsPublic/GetWOPIUserSession
HTTP (mf-http-grpc)POST /grpc/v1/get-wopiuser-session
RequestGetWOPIUserSessionRequest
ResponseGetWOPIUserSessionResponse
Book and levelServer integration API, specialized
Kindwrite
SessionNot needed: the call can be made before logging in.
Idempotentno
Returns metadata structure versionno
Streamingnone (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.

Request: GetWOPIUserSessionRequest

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
pwszkeystringThe token, of the kind that type names.
typeWOPITokenTypeWOPITOKEN_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).
objidObjIDThe object; used only with a container access token.
objid.typeint32The 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_idItemIDThe ID of the object within its type, in item_id.internal_id.
objid.item_id.internal_idint32The ID of the object or value list item.
objid.item_id.external_repository_idExternalRepositoryIDUsed only for objects in external repositories (external connectors). Leave it unset for objects stored in the vault.
file_idint32The 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.

FieldTypeDescription
wopi_user_sessionWOPIUserSessionThe 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_keystringThe WOPI vault user session key.
wopi_user_session.wopi_accesskeystringThe access of the shared file.
wopi_user_session.action_typeWOPIActionTypeThe WOPI Action type.Values: WOPIACTION_TYPE_VIEW (0), WOPIACTION_TYPE_EDIT (1), WOPIACTION_TYPE_COAUTHORING (2).
wopi_user_session.user_account_iduint32The user ID.
wopi_user_session.user_account_namestringThe user Account Name.
wopi_user_session.external_usernamestringThe External user name.
wopi_user_session.additional_dataWOPIClientAdditionalDataWOPI Client Additional data.
wopi_user_session.additional_data.return_uristringThe Return URL.
wopi_user_session.additional_data.main_app_urlstringThe Main Appp URL.
wopi_user_session.additional_data.wopi_end_pointstringThe WOPI Endpoint.
wopi_user_session.additional_data.culture_identifierstringThe Culture identifier.
wopi_user_session.additional_data.action_urlstringThe action URL.
wopi_user_session.additional_data.host_edit_urlstringThe Host edit URL.
wopi_user_session.obj_verObjVerThe ObjVer of the object.
wopi_user_session.obj_ver.obj_idObjIDThe object.
wopi_user_session.obj_ver.versionObjVerVersionThe version. Usually OBJ_VER_VERSION_TYPE_SPECIFIC with internal_version.
wopi_user_session.file_verFileVerThe FileVer of the object.
wopi_user_session.file_ver.file_idFileIDThe file.
wopi_user_session.file_ver.typeFileVerTypeFILE_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_versionint32The file version number.
wopi_user_session.file_ver.external_repository_versionstringUsed only for files in external repositories. Leave empty.
wopi_user_session.file_ver.external_repository_sort_keyint64Used only for files in external repositories. Leave 0.
wopi_user_session.is_shared_fileboolSpecifies the Shared file.
wopi_user_session.is_coauthorboolSpecifies the Co-authored file.
wopi_user_session.csrftokenstringThe CSRF Token.
wopi_user_session.onetimetokenstringThe One Time Token.
wopi_user_session.is_edit_allowedboolSpecifies whether the file can be edited or not.
wopi_user_session.client_typeClientTypeThe client type (user agent) identifier.