How to get list of files id from shared google drive folder using javascript?

626 views
Skip to first unread message

Heeg Ru

unread,
Oct 18, 2021, 1:33:57 AM10/18/21
to Google Apps Script Community
Hi! I have this shared for all folder with images https://drive.google.com/drive/folders/1drFCfJcb9KcB2pGHPgXX3W97OSdkVPw_
is it possible to get JSON with file names and their ids without any API tokens, auth, keys and passwords using only javascript? 

Alan Wells

unread,
Oct 18, 2021, 10:33:29 AM10/18/21
to Google Apps Script Community
You can use Apps Script which uses JavaScript along with Apps Script classes.
It depends on where the code is running from, who owns the Apps Script file and the permissions granted.
If Apps Script is running from your Google account then you won't need to use OAuth. All you need to use is the built-in DriveApp service.
If the code is running externally to the Google account with the folder, then you'd need to use the Google Drive API and OAuth.

Reply all
Reply to author
Forward
0 new messages