I'm trying to use PyDrive to get a list of all file ids in a Google Drive Folder. My query works when I use it on a folder within my drive but doesn't work when I try to use it on a folder in a shared Google Team Drive.
file_list = drive.ListFile({'q': "'folder_id_goes_here' in parents"}).GetList()
I tried appending arguments like 'team_drive_id' = team_drive_id_goes_here and 'supports_team_drive' = True, but I'm not sure if I'm adding these on correctly.
team_drive_id = 'team_drive_id_goes_here'
file_list = drive.ListFile({
'q': "'folder_id_goes_here' in parents",
'supportsTeamDrives': True,
'teamDriveId' = team_drive_id
}).GetList()
When I add these arguments to the ListFile function, I end up getting a 'googleapiclient.errors.HttpError: <HttpError 403' error.
Does anyone know how to modify this query to work with folders in shared team drives?