---
title: "Create a five-minute download link for one Google Drive file, for clients with a shell"
method: POST
path: "/v1/capabilities/google-workspace/drive-download-links"
tags: ["Capability Sources"]
---

# Create a five-minute download link for one Google Drive file, for clients with a shell

`POST /v1/capabilities/google-workspace/drive-download-links`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/capabilities/google-workspace/drive-download-links`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

For clients without OpenWork host file transport but with a shell, such as a Workbot computer or a coding agent. Download with curl into a file instead of reading the file into context; Docs, Sheets and Slides export to Office formats by default. To save edits back, prepare createGoogleDriveUploadSession with fileId and this revision as baseRevision. Uses the selected connection.

## Request body

- object
  - `fileId` string, required
  - `format` string: Google Docs, Sheets, Slides and Drawings only: export format, such as xlsx or csv for a Sheet, docx, md, txt or pdf for a Doc, pptx for Slides. Defaults to the Office format.

## Response `200`

Short-lived bearer download URL, as JSON and as an MCP resource link, with the file's revision; no file content.

- GoogleDriveDownloadLink
  - `ok` true, required
  - `file` object, required
    - `id` string, required
    - `name` string, required
    - `mimeType` string, required
    - `native` boolean, required: Google Docs, Sheets, Slides or Drawings file, pulled as an export.
    - `revision` string, nullable, required: Pass back as baseRevision when replacing this file, so newer Drive changes are never overwritten silently.
    - `md5Checksum` string, nullable, required
    - `size` integer, nullable, required
    - `modifiedTime` string, nullable, required
    - `webViewLink` string, nullable, required
    - `parents` string[], required
  - `download` object, required
    - `format` string, nullable, required
    - `mimeType` string, required
    - `extension` string, nullable, required: Extension the saved file needs, for exports.
    - `size` integer, nullable, required: Exact bytes for stored files; unknown until downloaded for exports.
    - `exported` boolean, required
    - `maxBytes` integer, required
  - `downloadUrl` string, uri, required: Secret bearer URL for this one file, valid for five minutes. Do not print, share, log or persist it.
  - `expiresAt` string, date-time, required
  - `resourceLink` object, required: The same download as an MCP resource link.
    - `type` 'resource_link', required
    - `uri` string, uri, required
    - `name` string, required
    - `mimeType` string, required
    - `size` integer
  - `instructions` string, required

## Other responses

- `400`: Folder, unsupported Google file type or invalid format.
- `401`: Sign in first.
- `403`: Organization policy blocks the selected connection.
- `409`: Connect Google with Drive read access, or the file is in the trash.
- `413`: The file is larger than the pull size limit.
- `502`: Google refused or did not return the file; the message gives Google's reason.

## Changes

- **2026-10-23** `c93387179b31`: 6 breaking, 8 info
  - the response property `download/extension` became nullable for the status `200`
  - the response property `download/format` became nullable for the status `200`
  - the response property `file/md5Checksum` became nullable for the status `200`
  - the response property `file/modifiedTime` became nullable for the status `200`
  - …10 more
- **2026-10-16** `569f127912d4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/capabilities/google-workspace/drive-download-links/post.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/84fb0f99fb95?raw)
