Skip to main content
GET
string
required
The API key for your account. You can find this in your account settings.
Object Download gives you a link to read a file. For a private file it signs a temporary link, valid from 60 seconds to 24 hours, that works without any credential. For a public file it returns the public URL. By default it answers with a 302 redirect, so you can point a browser or curl -L straight at it; redirect=false returns the link as JSON. Requires the blob:read scope. Temporary links (https://files.squarecloud.dev/d/...) can’t be revoked, support Range and conditional requests, and stop working when they expire or when the file is deleted, moved or changes visibility. For links you can revoke, cap or protect with a password, use a share link. See Links and sharing.
string
required
The id of the file.
number
default:"3600"
How long the temporary link lasts, from 60 to 86400 seconds (24 hours).
boolean
default:"true"
false returns the link as JSON instead of redirecting.
string
inline (open in the browser) or attachment (download). Setting it always produces a temporary link, even for public files.
string
The name the browser saves the file as. Implies attachment unless disposition says otherwise, and always produces a temporary link.

Rate limits

  • 60 requests per minute to this route (RATE_LIMITED, 429).
  • Each temporary link accepts 60 requests per minute per IP, on top of an overall limit for all the links of your account. Past that the link answers 429 in plain text. To hand one file to many people, make it public: public files are served by the CDN, without this limit. An expired or invalid link answers 404.

Response

With redirect=true (default): 302 with the link in Location and Cache-Control: no-store. With redirect=false:
string
“success” if successful, “error” if not.
object

Errors