socket.help
← Blog

Public or private file sharing: which should you use?

Choose the right access for a temporary file, keep tokens out of links, and understand one-time downloads, previews, and expiry.

Choose who should be able to download

A public file share works for anyone who knows its link. It is convenient for disposable test fixtures or a file you are comfortable making accessible to link holders. Forwarding the link forwards access.

A private share needs the link and a separate access token, or current access to the owning workspace. Private is the default in socket.help. It is useful when the link itself might be forwarded or pasted into a place with a wider audience.

Keep the link and token separate

The browser sharing link contains only the file’s resource ID. The recipient opens it and enters the access token. Send that token through a separate trusted channel. Do not append it to the URL, query string, or fragment.

Scripts download from /files/FILE_ID using the X-Access-Token header. Keep credentials in your environment or secret manager rather than committing them to source control. A private token controls access; it is not end-to-end encryption.

Download a private file
curl --fail https://socket.help/files/FILE_ID \
  -H "X-Access-Token: $FILE_ACCESS_TOKEN" \
  --output received-file.txt

Sharing is different from management

The access token lets a recipient download. An anonymous management token controls the resource’s sharing settings and deletion. It does not unlock a private download. Account-owned shares are managed through workspace permissions.

If a sharing token leaks, rotate it from the resource controls and send the replacement to authorized recipients. The old token stops working. Previously downloaded copies remain outside the service’s control.

Understand what one-time means

A one-time share accepts one download request. Once the last permitted download is consumed, stored file contents are removed. Metadata remains until expiry or deletion.

Opening a preview consumes a download too. A recipient can save the already fetched bytes from the preview without another server download. Anyone who downloads a file can keep or copy it; one-time access cannot revoke that copy.

Set expectations before sharing

Files are limited to 10 MiB and start with a one-hour lifetime. Retention can be extended within the owning plan’s limits. Check the displayed expiry and remaining downloads before sending a link.

Previews are available for supported text, JSON, images, audio, and video. Other formats download as attachments. Files are not scanned for malware. Use trusted files, keep an original copy, and delete a share when it is no longer needed.