Downloads file content, returning the raw binary stream directly (not JSON, not a pre-signed URL). The response includes Content-Type and Content-Length headers. Only files with downloadable=true can be downloaded; direct-upload and session sandbox copy files currently have downloadable=false and return 400.
Prerequisites
Endpoint and authentication configured. For details, see Overview and authentication.
Endpoint
GET /files/{file_id}/content
Path parameters
| Field | Required | Type | Description |
|---|---|---|---|
file_id | Yes | string | File ID |
Request example
Response
The response body is the raw binary stream of the file. The response headers include:
Content-Type: matches the file's actual typeContent-Length: file size in bytes
Error codes
| HTTP status | Error code | Description |
|---|---|---|
| 400 | invalid_request_error | File is not downloadable (downloadable is false) |
| 401 | InvalidApiKey | Invalid API key provided |
| 404 | not_found_error | File not found |