次の方法で共有


GetShareUrl (files)

iOS and Android Desktop

The GetShareUrl operation returns a share URL that's suitable for viewing a shared file when launched in a web browser.

POST (/wopi/files/(file_id)

The GetShareUrl operation returns a Share URL that's suitable for viewing a shared file when launched in a web browser. A host can support multiple Share URL types, as described by the SupportedShareUrlTypes property. The X-WOPI-UrlType request header contains the Share URL type that should be returned.

If the X-WOPI-UrlType header is not present or contains a value that's invalid or not supported by the host, the host should respond with a 501 Not Implemented.

Parameters

  • file_id (string) – A string that specifies a file ID of a file managed by host. This string must be URL safe.

Query parameters

  • access_token (string) – An access token that the host uses to determine whether the request is authorized.

Request headers

  • X-WOPI-Override – The string GET_SHARE_URL. This header is required.

  • X-WOPI-UrlType – A string indicating what Share URL type to return. This header is required.

Status codes

Note

Standard WOPI request and response headers

In addition to the request/response headers listed here, this operation may also use the Standard WOPI request and response headers.

Response

The response to a GetShareUrl call is JSON containing the following required property:

  • ShareUrl - A URL that points to a webpage, which lets a user access the file. This URL is required. For more information, see Share URL.