Use the read method to retrieve access information for a specific file identified by a content identifier (CID).

try {
  const fileId = 'file_id_here' // The ID of the file for which you want to retrieve access information.
  const cid = 'content_identifier_here' // The content identifier (CID) for accessing the file.

  const accessInfo = await sdk.fileAccess.read(fileId, cid)
  console.log('Access Information:', accessInfo)
} catch (error) {
  console.error(error.message)
}

Params

  • fileId (string): The ID of the file for which you want to retrieve access information.
  • cid (string): The content identifier (CID) for accessing the file.

Required API Key Permission

  • Read File