Get a download URL
getDownloadUrl
GET /api/v1/shares/{share_id}/download-url
Scope:
foldr.readRate cost: 2A short-lived URL that downloads the file straight from its storage, for clients that cannot follow a redirect to another host
Only on shares with direct downloads; the same governance rules as content apply. A native Google document is never given one (it is exported through Foldr: use content).
Request
Section titled “Request”curl "$FOLDR/api/v1/shares/$SHARE_ID/download-url" \ -H "Authorization: Bearer $TOKEN"$FOLDR is your site’s address (for example https://files.example.com) and $TOKEN is an access token. See Getting access.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
share_id | path | string | Yes | The share’s id. |
path | query | string | No | Path of the file. |
Responses
Section titled “Responses”| Status | Meaning | Body |
|---|---|---|
| 200 | The DownloadUrl. | application/json: DownloadUrl |
200 response
Section titled “200 response”| Field | Type | Description |
|---|---|---|
url | string (uri) | Required. The URL. It carries its own authorisation: send it no Foldr token, and do not log or share it. |
expires_at | string (date-time) | Required. The URL works until at least this time (RFC 3339, UTC); some storage keeps it working longer. |
Example:
{ "url": "https://files.example.com/", "expires_at": "2026-11-04T09:30:00Z"}Errors
Section titled “Errors”Every error is an application/problem+json document (ProblemDetails); branch on its type or code. See Errors.
| Status | Problem types | When |
|---|---|---|
| 400 | invalid-pathinvalid-request | One of: Invalid path (invalid-path); Invalid request (invalid-request). |
| 401 | invalid-token | Invalid token (invalid-token). |
| 403 | download-blockedinsufficient-scope | One of: Download blocked (download-blocked); Insufficient scope (insufficient-scope). |
| 404 | not-found | Not found (not-found). |
| 409 | ambiguous-pathapproved-version-unavailableno-direct-downloadnot-a-filenot-downloadablestorage-account-not-connected | One of: Ambiguous path (ambiguous-path); Approved version unavailable (approved-version-unavailable); No direct download (no-direct-download); Not a file (not-a-file); Not downloadable (not-downloadable); Storage account not connected (storage-account-not-connected). |
| 429 | rate-limited | Too many requests (rate-limited). |
| 500 | internal-error | Internal error (internal-error). |
| 503 | share-unavailableshare-unreachable | One of: Share unavailable (share-unavailable); Share unreachable (share-unreachable). |