Using Google Sheets API v4, I am looking to get the list of spreadsheets attached to my account. I did much research but have not found any solutions for that.
To get list of all files of specific type, you can use drive API v3. Below is an example to get all sheets from drive of authenticated user.
drive.files.list({
q: "mimeType='application/vnd.google-apps.spreadsheet'",
fields: 'nextPageToken, files(id, name)'
}, (err, response) => {
//Your code
})
You can pass file type in MIME type as 'q' parameter. You can get list of drive MIME types here.