def get_document_download_url(document_id: str, expires_in: int = 3600) -> Dict[str, Any]

Parameters

  • document_id (str): External ID of the document.
  • expires_in (int, optional): URL expiration time in seconds. Default is 3600 (1 hour).

Returns

  • Dict[str, Any] containing:
    • download_url – presigned URL usable in a browser or requests.get.
    • filename, content_type, expires_in, document_id (echoed back).

Example

info = db.get_document_download_url(doc.external_id)
print(info["download_url"])