---
title: "Generates a time-limited SAS download URL for a file attachment. Anonymous access is permitted when the print has file downloads enabled; otherwise the owner must be authenticated."
method: GET
path: "/api/Prints/{id}/files/{fileId}/download-url"
tags: ["Prints"]
---

# Generates a time-limited SAS download URL for a file attachment. Anonymous access is permitted when the print has file downloads enabled; otherwise the owner must be authenticated.

`GET /api/Prints/{id}/files/{fileId}/download-url`

## Request

- Base URL: `https://api.3dprintlog.com`
- URL: `https://api.3dprintlog.com/api/Prints/{id}/files/{fileId}/download-url`
- Auth: one of:
  - none
  - OAuth 2 (authorization code, authorization URL `https://3dprintlog.auth0.com/authorize`, token URL `https://3dprintlog.auth0.com/oauth/token`)
  - API key in header `X-Api-Key`
  - API key in query parameter `api_key`

## Path parameters

- `id` integer, required
- `fileId` integer, required

## Response `200`

Returns the download URL and its expiry time.

- PrintLogApiModelsDTOsPrintGetDownloadUrlResponse
  - `url` string, nullable
  - `expiresAt` string, date-time

## Other responses

- `403`: If file downloads are not enabled for this print and the user is not the owner.
- `404`: If the print or attachment does not exist.

---

[API](https://skmtc.dev/3dprintlog/apis/3d-print-log-api.md) · [All operations](https://skmtc.dev/3dprintlog/apis/3d-print-log-api/llms.txt) · [OpenAPI document](https://skmtc.dev/3dprintlog/apis/3d-print-log-api/revisions/dfc3a4df4e38?raw)
