How to get list of files by folder on Google Drive API
Here's how to get specific fields of files in a folder using v3 API:
https://www.googleapis.com/drive/v3/files?q="folderId"+in+parents&fields=files(md5Checksum,+originalFilename)
//
Replace "folderId" with the folder ID.
You can use &fields=files(*)
to get all of the file's fields.
If you're doing this on javascript with v3, try this on the request body:
{
q: `'${folderId}' in parents`
}
However, this could also list the files from this folder that were deleted and are in the bin.So, you can do it like this:
{
q: `'${folderId}' in parents and trashed = false`
}
You should be able to simply use files/list with a parent query;
GET https://www.googleapis.com/drive/v2/files?q='BB0CHANGEDIDF5waGdzbUQ5aWs'+in+parents&key={YOUR_API_KEY}