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}")
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const link = await client.files.get_download_link("file_a1b2c3d4e5f6");
console.log(`URL: ${link.downloadUrl}`);
console.log(`Expires in: ${link.expiresIn}`);
console.log(`Filename: ${link.filename}`);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
link, err := client.Files.GetDownloadLink(ctx, "file_a1b2c3d4e5f6")
if err != nil {
log.Fatal(err)
}
fmt.Printf("URL: %s\n", link.DownloadURL)
fmt.Printf("Expires in: %s\n", link.ExpiresIn)
fmt.Printf("Filename: %s\n", link.Filename)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
link = client.files.get_download_link(file_id: 'file_a1b2c3d4e5f6')
puts "URL: #{link.download_url}"
puts "Expires in: #{link.expires_in}"
puts "Filename: #{link.filename}"
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let link = client.files().get_download_link("file_a1b2c3d4e5f6").await?;
println!("URL: {}", link.download_url);
println!("Expires in: {}", link.expires_in);
println!("Filename: {}", link.filename);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->files()->getDownloadLink(
fileId: 'file_6dd6eb00688ad8d1',
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Files.GetDownloadLinkAsync("file_6dd6eb00688ad8d1");
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.files().getDownloadLink("file_abc123");
System.out.println(result);
}
}
curl -X GET \
'https://api.retab.com/v1/files/file_a1b2c3d4e5f6/download-link' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"download_url": "https://storage.googleapis.com/retab-files/...",
"expires_in": "60 minutes",
"filename": "invoice.pdf"
}
{
"detail": "File not found"
}
Files
Get Download Link
Get a temporary download link for a file.
Returns a short-lived signed download_url for the file identified by
file_id, along with its filename and expiration. Responds with 404
if no matching file exists.
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}")
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const link = await client.files.get_download_link("file_a1b2c3d4e5f6");
console.log(`URL: ${link.downloadUrl}`);
console.log(`Expires in: ${link.expiresIn}`);
console.log(`Filename: ${link.filename}`);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
link, err := client.Files.GetDownloadLink(ctx, "file_a1b2c3d4e5f6")
if err != nil {
log.Fatal(err)
}
fmt.Printf("URL: %s\n", link.DownloadURL)
fmt.Printf("Expires in: %s\n", link.ExpiresIn)
fmt.Printf("Filename: %s\n", link.Filename)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
link = client.files.get_download_link(file_id: 'file_a1b2c3d4e5f6')
puts "URL: #{link.download_url}"
puts "Expires in: #{link.expires_in}"
puts "Filename: #{link.filename}"
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let link = client.files().get_download_link("file_a1b2c3d4e5f6").await?;
println!("URL: {}", link.download_url);
println!("Expires in: {}", link.expires_in);
println!("Filename: {}", link.filename);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->files()->getDownloadLink(
fileId: 'file_6dd6eb00688ad8d1',
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Files.GetDownloadLinkAsync("file_6dd6eb00688ad8d1");
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.files().getDownloadLink("file_abc123");
System.out.println(result);
}
}
curl -X GET \
'https://api.retab.com/v1/files/file_a1b2c3d4e5f6/download-link' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"download_url": "https://storage.googleapis.com/retab-files/...",
"expires_in": "60 minutes",
"filename": "invoice.pdf"
}
{
"detail": "File not found"
}
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}")
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const link = await client.files.get_download_link("file_a1b2c3d4e5f6");
console.log(`URL: ${link.downloadUrl}`);
console.log(`Expires in: ${link.expiresIn}`);
console.log(`Filename: ${link.filename}`);
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
link, err := client.Files.GetDownloadLink(ctx, "file_a1b2c3d4e5f6")
if err != nil {
log.Fatal(err)
}
fmt.Printf("URL: %s\n", link.DownloadURL)
fmt.Printf("Expires in: %s\n", link.ExpiresIn)
fmt.Printf("Filename: %s\n", link.Filename)
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
link = client.files.get_download_link(file_id: 'file_a1b2c3d4e5f6')
puts "URL: #{link.download_url}"
puts "Expires in: #{link.expires_in}"
puts "Filename: #{link.filename}"
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let link = client.files().get_download_link("file_a1b2c3d4e5f6").await?;
println!("URL: {}", link.download_url);
println!("Expires in: {}", link.expires_in);
println!("Filename: {}", link.filename);
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->files()->getDownloadLink(
fileId: 'file_6dd6eb00688ad8d1',
);
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Files.GetDownloadLinkAsync("file_6dd6eb00688ad8d1");
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.files().getDownloadLink("file_abc123");
System.out.println(result);
}
}
curl -X GET \
'https://api.retab.com/v1/files/file_a1b2c3d4e5f6/download-link' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"download_url": "https://storage.googleapis.com/retab-files/...",
"expires_in": "60 minutes",
"filename": "invoice.pdf"
}
{
"detail": "File not found"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
A short-lived signed link to download a file, with its filename and expiry.
⌘I