Skip to content

Get a file download URL

client.file.url(stringid, RequestOptionsoptions?): FileURLResponse { expiresAt, url }
GET/v1/files/{id}/url

Returns a temporary download URL for the file. Only available for files in COMPLETED status.

Required scope: files:read

Rate limit category: Read

ParametersExpand Collapse
id: string

Unique identifier of the file to download.

ReturnsExpand Collapse
FileURLResponse { expiresAt, url }
expiresAt: string

When the download URL expires.

url: string

Temporary download URL for the file.

Get a file download URL

import Lightfield from 'lightfield';

const client = new Lightfield({
  apiKey: 'My API Key',
});

const fileURLResponse = await client.file.url('id');

console.log(fileURLResponse.expiresAt);
{
  "expiresAt": "expiresAt",
  "url": "url"
}
Returns Examples
{
  "expiresAt": "expiresAt",
  "url": "url"
}