Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Google Drive API: problem accessing Revisions List by using Google Service Account

When I read:
https://developers.google.com/drive/api/reference/rest/v3/revisions/list
and try this call right on the page - it works fine. I specify the following fields to retrieve:
fields='nextPageToken, revisions(id, modifiedTime, lastModifyingUser)'

But when I try to perform the same call with a Google Service Account credentials, it responds with a error:

HttpError: <HttpError 400 when requesting https://www.googleapis.com/drive/v3/files/1Exl8BrT_h0iG4qJ20InTyV_XZyeODF7OlfjI5JuBfa8/revisions?pag... returned "Invalid field selection emailAddress". Details: "[{'message': 'Invalid field selection emailAddress', 'domain': 'global', 'reason': 'invalidParameter', 'location': 'fields', 'locationType': 'parameter'}]">

 Does anyone know how to fix this?

 

Update 1:
Strangely, it works if you change the fields to the following:

fields='nextPageToken, revisions(modifiedTime, lastModifyingUser(displayName, emailAddress))'

Omitting the `id`

Why Google Service Account fails to read the `id` of file revisions?

0 1 2,021
1 REPLY 1