Generate presigned URL for downloading a file.
The URL is valid for the specified expiry time (default: 1 hour).
Args: file_id: File ID expires_in: URL expiry time in seconds (default: 3600, max: 86400)
Python
import requests url = "https://www.datalab.to/api/v1/files/{file_id}/download" headers = {"X-API-Key": "<api-key>"} response = requests.get(url, headers=headers) print(response.text)
{ "download_url": "<string>", "expires_in": 123, "file_id": 123, "original_filename": "<string>" }
Successful Response
Response with presigned download URL.
Presigned URL for downloading the file
URL expiry time in seconds
File ID
Original filename
Was this page helpful?