# Request Download Link

`GET https://api.torbox.app/v1/api/torrents/requestdl`

- Operation ID: `request_torrent_download_link`
- Group: Torrents
- Auth: API key as the `token` query parameter

### Overview

Requests the download link from the server. Because downloads are metered, TorBox cannot afford to allow free access to the links directly. This endpoint opens the link for 3 hours for downloads. Once a download is started, the user has nearly unlilimited time to download the file. The 1 hour time limit is simply for starting downloads. This prevents long term link sharing.

### Permalinks

Instead of generating many CDN urls by requesting this endpoint, you can instead create a permalink such as: `https://api.torbox.app/v1/api/torrents/requestdl?token=APIKEY&torrent_id=NUMBER&file_id=NUMBER&redirect=true` and when a user clicks on it, it will automatically redirect them to the CDN link. This saves requests and doesn't abuse the API. Use this method rather than saving CDN links as they are not permanent. To invalidate these permalinks, simply reset your API token or delete the item from your dashboard.

### Authorization

Requires an API key as a parameter for the `token` parameter.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `token` | query | string | yes | Your API Key |
| `torrent_id` | query | integer | yes | The torrent's ID that you want to download |
| `file_id` | query | integer | no | The files's ID that you want to download |
| `zip_link` | query | boolean | no | If you want a zip link. Required if no file_id. Takes precedence over file_id if both are given. |
| `user_ip` | query | string | no | The user's IP to determine the closest CDN. Optional. |
| `redirect` | query | boolean | no | If you want to redirect the user to the CDN link. This is useful for creating permalinks so that you can just make this request URL the link. |
| `append_name` | query | boolean | no | If you want to add the "filename" parameter to the returned CDN link. Optional. Default false. |

## Responses

- `200` Successful Response
- `307` Temporary Redirect
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable
