Create a link in the dashboard
#Unlock your vault, open a file's menu in Files and choose Create share link. Pick how long it works (one minute to 30 days), an optional download limit and an optional password, then copy the link. Shared access lists every active link with its download count, and revoking one stops it at once.
Share links work for files encrypted by OzVault clients: the dashboard, the SDKs and the CLI. Files written by connected OAuth applications are not shareable this way.
Create a link with an SDK
#createShareLink sends your rules to the API and adds the file's key to the link's #fragment, which browsers never send to a server. With a password, the key in the link is encrypted with the password (PBKDF2-SHA256 with 600,000 rounds, then AES-256-GCM), and the server receives only a SHA-256 proof of the password, which it stores as a scrypt hash.
const link = await vault.createShareLink(objectId, vaultKey, {
expiresIn: 7 * 86400,
password: 'correct horse',
maxDownloads: 10,
label: 'Q3 report',
});
console.log(link.url);link = vault.create_share_link(object_id, vault_key, expires_in=7 * 86400,
password='correct horse', max_downloads=10)ozvault share <object-id> --expires 7d --ask-password --max-downloads 10Open a link
#Recipients open the link in a browser, enter the password if there is one, and the file is downloaded and decrypted on their device. Scripts can use downloadShared (JavaScript), download_shared (Python), DownloadShared (Go) or ozvault get. No account or API key is needed. Each download first gets a single-use URL valid for ten minutes and counts against the limit. A wrong password is not counted.
const { name, blob } = await new OzVault().downloadShared(url, { password: 'correct horse' });Limits and API
#Lifetime 60 seconds to 30 days; up to 100,000 downloads per link; up to 1,000 active links per account. Password attempts are rate limited per visitor and per link. Names and labels of password-protected links are hidden until the password is accepted.
| Endpoint | Purpose |
|---|---|
| POST /v1/objects/{id}/share-links | Create a link (scope objects:read) |
| GET /v1/objects/{id}/share-links | List a file's live links |
| DELETE /v1/share-links/{id} | Revoke (scope objects:write) |
| GET /v1/shares/{token} | Public metadata |
| POST /v1/shares/{token}/download | Count a download, get a single-use URL |
Clear documentation is part of the product.