API Reference

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

  try {
    const id = 'file_id_here'; // The ID of the file you want to read.
    
    const [data, error] = await sdk.file.details({
      id
    });
    
    // Check for success
    if (error) {
      console.error('Failed to retrieve file details:', error);
    } else {
      console.log('File details:', data);
    }
  } catch (error) {
    console.error('An unexpected error occurred:', error.message);
  }

Params

  • id (string): The ID of the file you want to retrieve

Required API Key Permission

  • Read File