View links
A view link lets one specific person read a file for a limited time, without ever receiving the file itself. You create it with POST /v1/views, passing the file, the viewer's name and email, and a validity period.
{
"token": "TsTzcrhEaO2ge3ejImbqgKC33uCaRoQi0CzugwxFKcM",
"url": "https://docs.traductionexpert.com/v/TsTzcrhEaO2ge3ejImbqgKC33uCaRoQi0CzugwxFKcM",
"expiresAt": "2026-10-15T09:20:00.000Z"
}There are two ways to show the document to the viewer.
Option A: the hosted viewer
Send the returned url to the viewer, by email or in your interface. It opens the secure-docs viewer at https://docs.traductionexpert.com/v/<token>, which displays the watermarked pages, records the viewer's IP address and applies the deterrent measures described below. There is nothing else for you to build.
This is the right option for an external contractor who has no account with you. The viewer sees your account's branding on every page.
Option B: display the pages in your application
If the viewer is already signed in to your application, you can display the document there. The token then never leaves your server, which acts as a proxy:
- Your server calls
GET /v1/views/:tokento get the file name, the page count and the expiration. - For each page, it calls
GET /v1/views/:token/pages/:nand returns the JPEG to the browser from a route in your application. - In both cases, it passes the end viewer's IP address in the
x-viewer-ipheader. Without this header, secure-docs only knows your server's address, and the watermark carries no IP. - The browser draws each image in a
<canvas>rather than an<img>, and your component adds the deterrent measures: context menu, copy, Ctrl+S and Ctrl+P blocked, content blurred when the window loses focus, nothing when printing.
GET /v1/views/TsTzcrhEaO2ge3ejImbqgKC33uCaRoQi0CzugwxFKcM
Authorization: Bearer sd_live_…
x-viewer-ip: 203.0.113.24
GET /v1/views/TsTzcrhEaO2ge3ejImbqgKC33uCaRoQi0CzugwxFKcM/pages/1
Authorization: Bearer sd_live_…
x-viewer-ip: 203.0.113.24The Next.js integration guide contains the complete code for this option: server client, proxy routes and viewer component.
The watermark
Each page is rendered on demand, at the moment it is read. The watermark is burned into the image's pixels: it is not an overlay that could be removed in the browser. It contains:
- the viewer's name and email, as provided when the link was created;
- the date and time of display, in Paris time (
Europe/Paristime zone); - the viewer's IP address, if known;
- the account's branding, with a confidential document notice.
This information appears twice: as a subtle diagonal pattern across the whole page, so that a cropped screenshot remains identifiable, and in plain text in a strip at the bottom of the page. Custom branding is available from the Pro plan; otherwise, the default branding is used.
Validity period
The ttlSeconds field sets the link's lifetime. Default: 3600 seconds (one hour). A value outside your plan's bounds returns 400.
| Plan | Minimum | Maximum |
|---|---|---|
| Free | 60 seconds | 7 days (604,800 s) |
| Pro | 60 seconds | 30 days (2,592,000 s) |
| Business | 60 seconds | 30 days (2,592,000 s) |
Choose the shortest duration compatible with the work requested: a few hours for a proofread, the length of the assignment for a translation. An expired link returns 404, just like a link that never existed.
Revoke
Revocation takes effect immediately, including for a viewer who already has the viewer open: subsequent pages no longer load.
curl -X DELETE https://docs.traductionexpert.com/api/v1/views/TsTzcrhEaO2ge3ejImbqgKC33uCaRoQi0CzugwxFKcM \
-H "Authorization: Bearer $SECURE_DOCS_API_KEY"
# 204 No Contentcurl -X POST https://docs.traductionexpert.com/api/v1/files/9dab9089-bbc5-4853-a179-03e76523c5da/revoke-views \
-H "Authorization: Bearer $SECURE_DOCS_API_KEY"
# { "revoked": 3 }Deleting the file (DELETE /v1/files/:id) also deletes all its links.
The token is a secret
- Don't log it: redact it from your server's and your reverse proxy's access logs, as the API itself does.
- Serve pages that contain the token in their URL with
Referrer-Policy: no-referrer, so it doesn't leak to third-party sites through theRefererheader. - Don't send it to analytics or error-tracking tools.
- secure-docs stores only a SHA-256 hash of it: a database leak doesn't yield usable links.
Next pageNext.js integration