How to list all Google document from the Domain using Drive SDK?

后端 未结 2 638
花落未央
花落未央 2020-12-18 11:39

I want to list all the document from google domain.I have tried the as per mention in google documentation : https://developers.google.com/drive/v2/reference/files/list#exam

相关标签:
2条回答
  • 2020-12-18 12:24

    To get all files in your Google Apps domain you would need to:

    1. Setup domain-wide delegation of authority with your Service Account and Apps.
    2. Use the Directory API users.list() API call to determine all users in the Google Apps domain.
    3. As each user, call files.list(q='"me" in owners') to get a list of all files the user owns.

    The combined results of all these calls would be all files in your Google Apps domain.

    0 讨论(0)
  • 2020-12-18 12:28

    You can't :) because Google Drive file ownership logic is user-centric.

    You can only list files that are in the "My Drive" of the user used to call APIs.

    0 讨论(0)
提交回复
热议问题