Skip to main content
GET
/
v1
/
files
/
{file_id}
/
download-link
from retab import Retab

client = Retab()

link = client.files.get_download_link("file_a1b2c3d4e5f6")

print(f"URL: {link.download_url}")
print(f"Expires in: {link.expires_in}")
print(f"Filename: {link.filename}")
{
  "download_url": "https://storage.googleapis.com/retab-files/...",
  "expires_in": "60 minutes",
  "filename": "invoice.pdf"
}
Get a temporary signed URL to download the original file. The link expires after 60 minutes.
from retab import Retab

client = Retab()

link = client.files.get_download_link("file_a1b2c3d4e5f6")

print(f"URL: {link.download_url}")
print(f"Expires in: {link.expires_in}")
print(f"Filename: {link.filename}")
{
  "download_url": "https://storage.googleapis.com/retab-files/...",
  "expires_in": "60 minutes",
  "filename": "invoice.pdf"
}

Path Parameters

file_id
string
required
The ID of the file to generate a download link for.

Response Fields

download_url
string
A signed URL to download the file. Valid for 60 minutes.
expires_in
string
Human-readable expiration time (e.g., "60 minutes").
filename
string
The filename of the file.

Authorizations

Api-Key
string
header
required

Path Parameters

file_id
string
required

Query Parameters

access_token
string | null

Response

Successful Response

download_url
string
required

The signed URL to download the file

expires_in
string
required

The expiration time of the signed URL

filename
string
required

The name of the file