- Required for
Online iOS Android
The GetFile operation retrieves a file from a host.
Office for the web Tip
By default, Office for the web will use the GetFile WOPI request to retrieve files from the host. However, hosts can override this behavior by providing a direct URL to the file using the FileUrl property in the CheckFileInfo response.
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 will use to determine whether the request is authorized.
- Request Headers
X-WOPI-MaxExpectedSize – An integer specifying the upper bound of the expected size of the file being requested. Optional. The host should use the maximum value of a 4-byte integer if this value is not set in the request. If the file requested is larger than this value, the host must respond with a 412 Precondition Failed.
- Response Headers
- Response Body
The response body must be the full binary contents of the file.
- Status Codes