curl --request GET \
--url 'https://sandbox.circularo.com/api/v1/wopi/files/{file_id}/contents?token='import requests
url = "https://sandbox.circularo.com/api/v1/wopi/files/{file_id}/contents?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/wopi/files/{file_id}/contents?token=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.circularo.com/api/v1/wopi/files/{file_id}/contents?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.circularo.com/api/v1/wopi/files/{file_id}/contents?token="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.circularo.com/api/v1/wopi/files/{file_id}/contents?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/wopi/files/{file_id}/contents?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 412,
"type": "RESOURCE:PRECONDITION_FAILED",
"message": "Resource precondition failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 498,
"type": "SHARE_AUTH:TOKEN_INVALID",
"message": "Invalid share token",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Hand the file's bytes to the online editor
GET /wopi/files/{file_id}/contents
Answers the WOPI GetFile call with the bytes of the file, so that the online editor has something to open. The version the editor should remember the content by comes back in the X-WOPI-ItemVersion response header.
Within an editing session this is the working copy the session writes into, not the document’s stored file. Access is checked here in its own right, against the caller’s rights to the file and to the document it belongs to, whether the caller is an account of the platform or somebody working through a share.
WOPI authorization: Authorize using a token or an access token, or a share token and a one-time password (if required), to call this endpoint.
Required rights for the internal user: view_oos
Allowed share object types for the external recipient: document
Allowed share purposes for the external recipient: sign or execute or approve or review or accept or view
curl --request GET \
--url 'https://sandbox.circularo.com/api/v1/wopi/files/{file_id}/contents?token='import requests
url = "https://sandbox.circularo.com/api/v1/wopi/files/{file_id}/contents?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/wopi/files/{file_id}/contents?token=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.circularo.com/api/v1/wopi/files/{file_id}/contents?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.circularo.com/api/v1/wopi/files/{file_id}/contents?token="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.circularo.com/api/v1/wopi/files/{file_id}/contents?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/wopi/files/{file_id}/contents?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 412,
"type": "RESOURCE:PRECONDITION_FAILED",
"message": "Resource precondition failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 498,
"type": "SHARE_AUTH:TOKEN_INVALID",
"message": "Invalid share token",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Authorizations
Headers
Query Parameters
Response
Returns the file's bytes.