🚧 GetFileWopiSrc (bootstrapper)
Warning
This operation should not be called by WOPI clients at this time. It is reserved for future use and subject to change.
POST /wopibootstrapper
This operation is equivalent to the 🚧 GetFileWopiSrc (ecosystem) operation.
Important
The request/response semantics for this operation differ slightly from its counterpart on the Ecosystem endpoint since it is exposed on the Bootstrapper endpoint, and thus will use OAuth 2.0 access tokens for authorization instead of WOPI access tokens.
Request Headers
- X-WOPI-EcosystemOperation – The string
GET_WOPI_SRC_WITH_ACCESS_TOKEN
. Required. - X-WOPI-HostNativeFileName – A string representing the host-specific file identifier for a file.
- Authorization – A string in the format
Bearer: <TOKEN>
where<TOKEN>
is a Base64-encoded OAuth 2.0 token. If this header is missing, or the token provided is invalid, the host must respond with a 401 Unauthorized response and include the WWW-Authenticate header as described in WWW-Authenticate response header format.
- X-WOPI-EcosystemOperation – The string
Response Headers
- WWW-Authenticate – A string value formatted as described in WWW-Authenticate response header format. This header should only be included when responding with a 401 Unauthorized.
Status Codes
- 200 OK – Success
- 401 Unauthorized – Authorization failure; when responding with this status code, hosts must include a WWW-Authenticate response header with values as described in WWW-Authenticate response header format
- 404 Not Found – Resource not found/user unauthorized
- 500 Internal Server Error – Server error
Response
The response to a GetFileWopiSrc call is JSON containing the following required properties:
Bootstrap - The contents of this property should be the response to a Bootstrap operation.
WopiSrcInfo - The contents of this property should be the response to a 🚧 GetFileWopiSrc (ecosystem) operation.
Sample response:
{
"Bootstrap": {
"EcosystemUrl": "http://.../wopi*/ecosystem?access_token=<ecosystem_token>",
"UserId": "User ID",
"SignInName": "user@contoso.com",
"UserFriendlyName": "User Name"
},
"WopiSrcInfo": {
"Url": "http://.../wopi*/[containers|files]/<id>?access_token=<file|container_token>&access_token_ttl=<timestamp>"
}
}