> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/stackai-tools/file-creation-and-conversion/download-private-file.md).

# Download Private File

Retrieve a file from a URL that requires an authorization token, then return a signed download link for later workflow steps.

## Use this tool

1. Supply **Protected File URL**.
2. Set **Auth Type** to the authorization scheme expected by that endpoint and supply **Token**.
3. Set **File Extension** to match the downloaded file.
4. Run the tool and pass **Public File URL** only to the steps or recipients that need the file.

## Behavior and limits

The request uses an Authorization header containing the auth type and token. It does not perform an interactive sign-in. The returned signed link can be opened without the original provider credentials; treat the link as access to the file. An empty download or failed authorization stops the action.

## Inputs

| Field                         | Parameter        | Description                                                                                                                                                  |
| ----------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Protected File URL (required) | `protected_url`  | The URL to download. This endpoint requires a token for access.                                                                                              |
| Auth Type                     | `auth_type`      | The authentication type that goes before the token to authenticate the download request. For example, 'Bearer', 'Basic', etc. The default value is 'Bearer'. |
| Token (required)              | `token`          | The auth token used to authenticate the download request.                                                                                                    |
| File Extension (required)     | `file_extension` | The file extension for the downloaded file (e.g., .pdf, .docx, .xlsx, .png)                                                                                  |

## Outputs

| Field           | Parameter  | Description                                                           |
| --------------- | ---------- | --------------------------------------------------------------------- |
| Public File URL | `file_url` | A signed URL that allows downloading the file without authentication. |

## Related guides

* [File Uploads, Generated Files, and Downloads](https://docs.stackai.com/technical-reference/interfaces-and-conversations/file-uploads-generated-files-and-downloads.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/stackai-tools/file-creation-and-conversion/download-private-file.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
