?
dataSources.shareUrl
Mints a signed, expiring URL for a single source document.
DataSource.shareUrl(document, options?) → string
Signs a time-limited URL to one of the corpus's source documents, so it can be handed to a browser session with no app auth, the same idea as store.shareUrl for a file. expiresIn sets the lifetime.
Parameters
document
string | { documentId }
RequiredThe document to share, by id.
options.expiresIn
number
Link lifetime in seconds (60s to 90d).
Hand out a source
const url = await Docs.shareUrl(documentId, { expiresIn: 3600 });