Use the contents
method to retrieve the contents (directories and files) of a specific drive.
try {
const driveId = 'drive_id_here'; // The ID of the drive to view its contents.
const response = await sdk.drive.contents(driveId);
console.log('Drive Contents:', response.data);
} catch (error) {
console.error(error.message);
}
Params
- id (string): The ID of the drive for which you want to retrieve contents.
Required API Key Permission
Read Directory