Shared Links Are Credentials: Tokens, Expiry and Revocation
Table of Contents
Paste a share link into a chat window and the file is out of your hands. There is no second factor, no identity check, and on most services no record of who opened it. The URL is the credential: whoever holds the string is authorised to fetch the bytes, and the protocol has no way to distinguish your intended recipient from a forwarded copy. That single property explains how expiry, revocation and password gates actually behave, and why a one-time download protects less than its name suggests.
The token inside the URL is the secret
A share URL has two halves. The path identifies the object; the token, the random-looking string minted when you press share, is what authorises access. Its strength is measured in bits, and the arithmetic is plain: a base62 alphabet (0-9, a-z, A-Z) carries log2(62) ≈ 5.95 bits per character. Twelve characters give roughly 71 bits, twenty give roughly 119. Shorter codes over smaller alphabets collapse quickly, and that is where guessable links come from.
| Token | Alphabet | Entropy | Practical reading |
|---|---|---|---|
| 8 characters | base62 | ~48 bits | Only safe behind strict rate limiting |
| 12 characters | base62 | ~71 bits | Beyond guessing at any realistic request rate |
| 20 characters | base62 | ~119 bits | Comparable to a generated password |
| 32 characters | hex | 128 bits | Same strength, twice the string length |
Entropy answers exactly one question: can an outsider guess the string. It says nothing about who is allowed to use it. A 128-bit token is still a 128-bit password printed on the outside of an envelope.
A share link is a bearer token, not a permission bound to a person. Anyone who can read the string acts with your authority, and nothing in the request distinguishes the recipient you chose from a stranger who received a copy.
Expiry and revocation act on the URL, not on the bytes
Revoking a link deletes the lookup. The service stops resolving the token and the next request returns 403 or 404 depending on the implementation. Everything already downloaded stays downloaded: revocation is a statement about future requests, never about copies sitting on someone else's disk.
Expiry is the same control on a timer. You set a window in days or in downloads, and the token stops resolving when it closes. It matters most for anything indexed in public, because crawlers and archive services work on their own schedule.
Two habits follow. Rotate instead of reusing: when the audience of a file changes, mint a new token and revoke the old one, so an old URL cannot reach new content. And record the revocation date, because the question three months later is not "is it off?" but "when exactly was it switched off?"
What a password gate covers, and what encryption changes
Password protection adds a second secret. On most consumer services the check runs on the server: the provider stores a digest of the password, compares it on each request and starts streaming when it matches. That stops the stranger who finds the URL in a search index, which is the common case. It does not stop the provider, and it achieves nothing if the password travels in the same message as the link.
End-to-end encryption changes the model rather than hardening it. The file is encrypted on your device before upload, so the provider holds ciphertext it cannot read. Several implementations place the key in the URL fragment, the part after the #, which browsers do not send in the HTTP request line and do not include in the Referer header. That is a property of the protocol, not a vendor claim. The consequence is concrete: link and key still form one credential, but a breach, a court order or a curious employee yields noise. The trade is that no reset exists. Lose the key and nobody recovers the file, including you.
One-time links bound fetches, not copies
A one-time download link is invalidated when the file is served, either as the transfer begins or when it completes, depending on the implementation. It bounds how often the service hands out the bytes. It cannot bound how many copies exist. A recipient who saves the file has the file and can place it anywhere; from that moment the token controls nothing at all.
A second failure mode catches people out. Mail gateways, chat clients and link-preview services issue GET requests to build a preview or scan for hostile content. Where those count as the download, the token is consumed before a human clicks. An "expired" link sent minutes ago is usually a scanner, not carelessness.
The channel leaks more often than the cipher
Most exposures are not cryptographic. They are the channel: a group chat with two hundred members, an email thread forwarded twice, a ticketing system that indexes every URL in every comment, a screenshot that includes the address bar. Once the URL enters a channel, that channel's retention policy becomes the link's retention policy, and you lose track of how many copies of the credential exist.
The cheap fix is procedural. Send the link through one channel and the password through another: link by email, password by voice or through a messenger with end-to-end encryption. One compromised channel then stops being enough. The same logic rules out pasting a share URL into a public issue tracker or a support forum, even for a file you consider unimportant.
Building an audit trail you can defend
Consumer services give you a download counter and occasionally a country breakdown. Almost none tell you which person opened a link, because the request carries no identity to report. The audit trail does not exist in the product, so keep it yourself.
- Open a ledger, one row per share: the first eight characters of the token, a short description of the file, the recipient, the channel used, the date sent and the expiry date.
- Compute the file's SHA-256 before sending and record it in the ledger next to the row.
- Publish or transmit the digest through a different channel from the link, so the recipient can confirm the copy is identical.
- Review the ledger on a fixed schedule and revoke every link older than the retention you agreed, reissuing only where someone still needs access.
- When a collaborator leaves, treat every token they received as compromised: rotate all of them, not just the one you remember.
It is cheap, it survives a personnel change, and it answers the only question that matters after a leak: who could have held the string.
A share link is a password with a URL wrapped around it, and the three problems — the string, the channel, the copy — need separate answers. Before sending anything, compute the digest in the checksum verifier and hand it over separately; the command-line side is covered in how to verify a file hash.
Troubleshooting Common Issues
| Error / Issue | Technical Cause | Step-by-Step Fix |
|---|---|---|
| HTTP 403 on a link that worked yesterday | The token was revoked, the file was moved to another folder, or the expiry window closed. | Open the share settings, confirm the current token state and issue a new link; never resend the old URL. |
| One-time link reports expired minutes after sending | A mail gateway, chat preview or security scanner requested the URL and consumed the single use. | Generate a new one-time link and deliver it through a channel that does not prefetch URLs, or switch to a password-protected link. |
| net::ERR_INCOMPLETE_CHUNKED_ENCODING on a large file | A proxy timeout or a dropped connection cut the chunked response before its terminator arrived. | Resume with a download manager or on another network, then compare the SHA-256 with the published value. |
Frequently Asked Questions
Is a share link really as sensitive as a password?
Yes, in access terms. The token authorises anyone who presents it, with no identity check behind it. Leaking a link is equivalent to leaking a password that cannot be changed for that recipient alone: you can revoke the token, but every copy already circulated stays in chat logs and mailboxes.
Does revoking a link delete copies that were already downloaded?
No. Revocation deletes the lookup, so future requests fail. Bytes already transferred live on the recipient's disk and cannot be recalled. Only encryption you control, applied before upload, limits what a copy is worth to whoever holds it.
Do one-time download links guarantee confidentiality?
No. They limit how often the service serves the file, not how many copies exist. A recipient who saves the file can keep it, upload it elsewhere or forward the content. One-time links protect against casual forwarding of the URL, nothing beyond that.
Where should the decryption key go when the archive is encrypted?
Never in the same message as the link. If the service puts the key in the URL fragment, that fragment is one credential and must travel through a second channel. Sending link and key together reduces end-to-end encryption to ordinary server-side storage.
Related Technical Guides
Cloud Account Quotas and 2FA Across Several Providers
How quota meters really count space, which free upgrades last, and how TOTP, recovery codes and inactivity clauses can cost you an account.
Diagnosing Failed Downloads: Codes, Truncation, Corruption
Read 403, 404, 410, 429 and 503 correctly, tell a truncated file from a corrupt one, and resume with HTTP Range instead of starting over.
Large Uploads That Survive Interruptions: Chunks, Limits, Hashes
How chunked uploads work, why closing the tab loses the progress, when compression helps, and how to prove the file landed intact.
Receiving Files From Third Parties Without Sharing a Folder
Write-only upload links, per-file ceilings, duplicate submissions and real MIME checks: how a team validates what a client sends before archiving it.