---
title: "🔒 Проксирование скачивания внешнего файла по URL."
method: GET
path: "/file/proxy-download"
tags: ["Files"]
---

# 🔒 Проксирование скачивания внешнего файла по URL.

`GET /file/proxy-download`

## Request

- Base URL: `http://localhost`
- URL: `http://localhost/file/proxy-download`
- Auth: one of:
  - API key in header `sid` and API key in header `rts` and API key in header `sig`
  - HTTP bearer

Проксирование скачивания внешнего файла по URL.

**Access:** `authorized` (10 ) · **Scope:** `read`

**Allows:** не требуются — download utility limited to the storage allow-list, no resource

### TypeScript (copy-paste)

**`GET /file/proxy-download`**

<details open><summary><b>Params</b></summary>

```typescript
export interface FileProxyDownloadParams {
  url: string
}
```

</details>

<details open><summary><b>Response</b></summary>

```typescript
export type FileProxyDownloadResponse = IServerResponse<Resp_file_proxy-download>

export interface IServerResponse<T = any> {
  code: number
  data: T
  srvTS: number
  rkey: string
}
```

</details>

> Полный файл типов: [`/docs/types`](/docs/types) · raw: [`/docs/api-types.ts`](/docs/api-types.ts)

## Query parameters

- `url` string, required

## Headers

- `devID` string, uuid, required
- `tz` string, required
- `app` string, required
- `appVer` string, required
- `rKey` string

## Response `200`

OK — `IServerResponse<Resp_file_proxy-download>`

- object
  - `code` integer, required
  - `data` RespFileProxyDownload, required: Empty response object
  - `srvTS` integer, required: Server timestamp (ms)
  - `rkey` string, required: Request key

## Other responses

- `400`: BadRequest: Invalid or unsupported URL format, URL host is not allowed, or upstream error/timeout
- `401`: Unauthorized: Active user session required
- `403`: AccessNotAllowed — недостаточно прав или неверная подпись
- `404`: NotFound: File/image not found at upstream URL
- `406`: TimeResync — расхождение rts с сервером

---

[API](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api.md) · [All operations](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/revisions/a143b51ba29a?raw)
