Use the details method to retrieve a specific file by its ID.

try {
  const fileId = 'file_id_here' // The ID of the file you want to read.
  const response = await sdk.file.details(fileId)
  console.log(response.data) // The file contents
} catch (error) {
  console.error(error.message)
}

Params

  • fileId (string, optional): The ID of the file you want to retrieve. If not provided, it retrieves all your files.

Required API Key Permission

  • Read File