Skip to main content
Refresh File Links
Every file link Sublay returns stops working at its File’s linksExpireAt, 24 to 48 hours after it was read (see File links). This endpoint returns fresh Files, with new links, for files the viewer can still see: send the ids of the files whose links expired. A file the viewer can’t see, or one that doesn’t exist, is left out of the answer, with no reason given. A viewer who has lost access to a file’s record gets no fresh link for it. Open to a user token, a service key, or no credentials. A service key sees what the user named in actingUserId sees; naming nobody, it sees files that belong to nothing and those anyone can see. With no credentials, only files anyone can see come back. In React and React Native, useFileLinks calls this for the Files rendered through it. Rate limit: 100 requests per 5 minutes.

Body

string[]
required
The ids of the files to refresh: 1 to 100 UUIDs. Each file’s id is its id, and is also the second-to-last segment of every link to it.
string
Service key only: the user this read acts as. A user token always acts as its own user and must not send it (400 files/acting-user-not-allowed).

Response

File[]
A full File for each id the viewer can see, in the order asked for (an id sent twice comes back once), with fresh links and a new linksExpireAt.

Error Responses

Returned when fileIds is missing, empty, longer than 100 or holds a value that isn’t a UUID, or the body has a field this endpoint doesn’t take.
A user token, or a request with no credentials, sent actingUserId. Only a service key names the user it acts as.
Returned when a service key names an actingUserId that isn’t a user in this project.