IRPCWOPIOperations.CreateWOPIUserSession

View as Markdown

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

Creates a WOPI user session for one file version and returns its token (or a one-time token that can be exchanged for it).

ServiceWOPI operations MFiles.IRPCWOPIOperations
gRPC method/MFiles.IRPCWOPIOperations/CreateWOPIUserSession
HTTP (mf-http-grpc)POST /grpc/v1/create-wopiuser-session
RequestCreateWOPIUserSessionRequest
ResponseCreateWOPIUserSessionResponse
Book and levelServer integration API, specialized
Kindwrite
SessionRequired: the session ID from LogIn in the mfiles-session-id-bin metadata.
Idempotentno
Returns metadata structure versionno
Streamingnone (unary)

Remarks

For M-Files components only. M-Files Web and M-Files Desktop call it before they open a file in Office for the web. Applications should not call it.

Request: CreateWOPIUserSessionRequest

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 file to open: obj_ver, file_ver, action_type, user_account_id (the session's own user ID), external_username (usually empty) and additional_data (the URLs and culture that the WOPI host passes on to Office for the web; the URLs are validated). The other fields are ignored.
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.
typeWOPITokenTypeWOPITOKEN_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.Values: WOPITOKEN_TYPE_WOPIVAULT_USER_SESSION_TOKEN (0), WOPITOKEN_TYPE_ONE_TIME_TOKEN (1), WOPITOKEN_TYPE_WOPICONTAINER_TOKEN (2).

Response: CreateWOPIUserSessionResponse

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

FieldTypeDescription
wopi_keystringThe token of the requested type.