I'm attempting to access a spreadsheet that's under the "google.com" domain using the Google Drive Java API through a service account. I need to export several of the worksheets contained within the document.
I've been able to create and use a service account (used via the Java API) but am not sure how to go about access, or if what I'm trying to do is even viable. I saw the following page: https://developers.google.com/drive/web/delegation but it seems highly unlikely that a service account I'm working with will be granted access to the google.com corporate domain. Our account contact at Google suggested we check the forums for some advice.
Given this, I have a couple of questions about approach:
- Am I misunderstanding the access requirements? More specifically is there a way to grant a service account access to a specific document?
- Is this task (worksheet export) better suited to the Spreadsheets API? That API seemed focused on operating within a spreadsheet, and the drive API seems to deal with file/document management.
- Will a copy of the document to a different domain be required?
My guess is that we will need to copy the document, but I wanted to be sure, and to make sure that I'm understanding the APIs and access correctly.
Thanks!