---
title: "Stream a OneDrive or SharePoint file's bytes to host file transport"
method: GET
path: "/v1/direct-downloads/microsoft-365/drive-files/content"
tags: ["Direct uploads"]
---

# Stream a OneDrive or SharePoint file's bytes to host file transport

`GET /v1/direct-downloads/microsoft-365/drive-files/content`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/direct-downloads/microsoft-365/drive-files/content`
- Auth: HTTP bearer

Streams stored files as-is (Range: bytes=START-END, up to 8 MiB per request) or converts Office files to PDF whole. Den does not keep or inspect the bytes. Responses stop at the pull size limit.

## Query parameters

- `driveId` string
- `itemId` string, required
- `format` 'pdf'
- `connectionId` string

## Response `200`

File bytes.

## Other responses

- `206`: Requested byte range.
- `400`: Invalid request, a folder, or an item without content.
- `401`: Sign in first.
- `403`: Organization policy blocks the selected connection.
- `409`: Connect Microsoft 365 with the needed permission, or the file changed since baseRevision (drive_conflict).
- `502`: Microsoft refused or did not return the file; the message gives Microsoft's reason.

## Changes

- **2026-10-23** `c93387179b31`: 2 breaking, 3 info
  - the response property `anyOf[subschema #2]/currentRevision` became nullable for the status `409`
  - the response property `anyOf[subschema #2]/modifiedTime` became nullable for the status `409`
  - response property `anyOf[#/components/schemas/InvalidRequestError]/details/items/path/items/` list-of-types was narrowed by removing types `number` from media type `application/json` of response `400`
  - response property `anyOf[subschema #2]/currentRevision` list-of-types was narrowed by removing types `null` from media type `application/json` of response `409`
  - …1 more
- **2026-10-23** `3e38eb291e52`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/direct-downloads/microsoft-365/drive-files/content/get.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) - [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openworklabs/apis/den-api/revisions/8170cf4a92ca?raw)
