Search code examples
androidgoogle-drive-apigoogle-drive-realtime-api

how to get google drive Storage Quota


I am using Google Drive API in android for listing, uploading and downloading files of Google Drive and I have successfully implemented it.

Now i want User Storage Quota like how much space user has used and how much is left. Can any one suggest me how to do that?


Solution

  • You can retrieve quota info from about resource by making an authenticated call to

    GET https://www.googleapis.com/drive/v2/about
    

    which is going to return an about entity with quotaBytesTotal and quotaBytesUsed.