curl --request GET \
--url https://api.openworklabs.com/v1/direct-downloads/microsoft-365/drive-files \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openworklabs.com/v1/direct-downloads/microsoft-365/drive-files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openworklabs.com/v1/direct-downloads/microsoft-365/drive-files', 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://api.openworklabs.com/v1/direct-downloads/microsoft-365/drive-files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.openworklabs.com/v1/direct-downloads/microsoft-365/drive-files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.openworklabs.com/v1/direct-downloads/microsoft-365/drive-files")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/direct-downloads/microsoft-365/drive-files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"file": {
"id": "<string>",
"driveId": "<string>",
"parentId": "<string>",
"name": "<string>",
"mimeType": "<string>",
"revision": "<string>",
"size": 0,
"modifiedTime": "<string>",
"webUrl": "<string>"
},
"download": {
"format": "pdf",
"mimeType": "<string>",
"extension": "<string>",
"size": 0,
"exported": true,
"maxBytes": 0
}
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "unauthorized"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "needs_connection",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "microsoft_graph_error",
"message": "<string>",
"outcome": "unknown",
"retryable": false
}Describe a OneDrive or SharePoint file pull for host file transport
Returns the file’s drive, eTag revision and the exact format and size a pull would save, without downloading content. Hosts then fetch the content route in ranged chunks. Optional connectionId selects a Microsoft 365 connection; unavailable selections never fall back to the default.
curl --request GET \
--url https://api.openworklabs.com/v1/direct-downloads/microsoft-365/drive-files \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openworklabs.com/v1/direct-downloads/microsoft-365/drive-files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openworklabs.com/v1/direct-downloads/microsoft-365/drive-files', 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://api.openworklabs.com/v1/direct-downloads/microsoft-365/drive-files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.openworklabs.com/v1/direct-downloads/microsoft-365/drive-files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.openworklabs.com/v1/direct-downloads/microsoft-365/drive-files")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/direct-downloads/microsoft-365/drive-files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"file": {
"id": "<string>",
"driveId": "<string>",
"parentId": "<string>",
"name": "<string>",
"mimeType": "<string>",
"revision": "<string>",
"size": 0,
"modifiedTime": "<string>",
"webUrl": "<string>"
},
"download": {
"format": "pdf",
"mimeType": "<string>",
"extension": "<string>",
"size": 0,
"exported": true,
"maxBytes": 0
}
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "unauthorized"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "needs_connection",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "microsoft_graph_error",
"message": "<string>",
"outcome": "unknown",
"retryable": false
}Authorizations
MCP access token issued by the Den OAuth authorization server, passed as Authorization: Bearer <token>. Used by MCP transports and the direct-upload routes they call.
Query Parameters
The file's driveId from a search, folder or link result. Omit for the member's own OneDrive.
1 - 5121 - 512A OneDrive, SharePoint or Teams file link instead of driveId and itemId.
2048^https:\/\/.*pdf converts a Word, Excel, PowerPoint or other Office file; omit to transfer the stored bytes.
"pdf"Selected Microsoft 365 connection; omit for the default. Unavailable selections never fall back to another account.
^(microsoft-365|emc_[A-Za-z0-9]+)$Was this page helpful?