A file that is shared with the link can only be discovered by users that can
access the file as a result of a
Requests from users that only have access to these link-shared files via a
type=anyone permission, may require a resource key.
This resource key requirement only applies to a subset of old files.
For more information about permissions, see Share files, folders and drives.
Read the resource key from the file
The Drive API returns a file's resource key on the read-only
field of the
If the file is a shortcut, the resource key
for the target of the shortcut is returned on the read-only
Set the resource key on the request
Resource keys for any files referenced by requests to the Drive API are set
X-Goog-Drive-Resource-Keys HTTP header.
A pair of file ID and resource key are set on the header using a forward
/) separator. The header is built by combining all these file ID and
resource key pairs using comma (
For example, consider a request to move file
fileId1 from folder
fileId3. Let's assume the resource keys for these three files are
The header built from these values using forward slash and comma separators is: