1
votes

Hello I am new in google docs API, I want to get list of all documnets not spreadsheet using google doc API, I have got API but that gives document when you specify documentId, can anyone have idea is there way to get list of all documents created by user.

window.gapi.client.docs.documents.get({documentId:'123'})

aboe is sample code to get specific document I want list of all document. thanks in advance.

1
Do you want to get a list of documents in a user's Drive? or where? It seems to me you want to use the Drive API, and add some filters to the query. - Aerials
@Aerials no, I want a list of documents that users have created. - Kalpesh Kashyap
Where do you want check this? - Aerials
I am working on react app where I want to show a list of documents created by the user in dropdown - Kalpesh Kashyap
Where are the users creating the "documents"? Where are they being stored? - Aerials

1 Answers

1
votes

Those documents are stored in the user's Google Drive. You have to get their consent first. Create a GCP project and a consent screen for users to authorize your App to access their Google Drive through the Drive API.

Then you can list the files in their Drive.