Has anything changed recently with the Google Drive APIs and specifically the Export function, which would cause it to fail while using API Key access after 27-Mar-2018?
I have a Windows Service that creates and sends daily course emails for an educational group. The source content for each email is stored in a Google Drive, as a Google Doc, so that the faculty can update the course content easily.
This has been working flawlessly for the past year, but suddenly stopped working about 27-Mar-2018. Since then, I can retrieve the file details;
_googleDriveHtmlContent.LoadFile(
fileId
);
But not the contents. When I Export
the file as HTML, I immediately get a DownloadStatus.Failed
from the ProgressChanged
handler;
var request = _driveService.Files.Export(
fileId,
"text/html"
);
I'm using API keys for security, rather than OAuth, since it's a UI-less service. To do this I need to mark the file folders as publicly accessible - specifically I'm using "Accessible to everyone, with link." This has been working great.
I've updated to the latest API v3 libraries through NuGet, with no change in behavior.
Using Google's API Explorer, I'm seeing a similar behavior.
I can retrieve my file successfully using the API Explorer with the get
endpoint.
https://developers.google.com/drive/v3/reference/files/get
- fileId
1AIuGhzXsNuhhi0PMA1pblh0l5CCDaa1nPj8t_dasi_c
- Authentication: API key (uses a "demo API key")
But with the export
endpoint, I get an Internal Error (500)-
https://developers.google.com/drive/v3/reference/files/export
- fileId
1AIuGhzXsNuhhi0PMA1pblh0l5CCDaa1nPj8t_dasi_c
- mimeType:
text/html
- Authentication: API key (uses a "demo API key")
Changing the Authentication in the API Explorer to OAuth 2.0, and approving access, then returns a successful 200 result with the file HTML. However I'm unable to do that since I'm accessing the API via a UI-less service.