I'm trying to programmatically perform the following actions from within a Google Cloud Function:
Here’s what I’ve tried so far:
In both cases, the ownership transfer request fails with this error:
I/O error: 403 Forbidden
POST https://www.googleapis.com/drive/v3/files/156cD3L0-Yg_33qENsZseA6FiBHkwL9PpqYuzp7Q7whQ/permissions?sendNotificationEmail=true&transferOwnership=true
{
"code" : 403,
"errors" : [
{
"domain" : "global",
"message" : "Consent is required to transfer ownership of a file to another user.",
"reason" : "consentRequiredForOwnershipTransfer"
}
],
"message" : "Consent is required to transfer ownership of a file to another user."
}
Has anyone successfully transferred file ownership via the Google Drive API from within a Google Cloud Function, especially when dealing with personal Google accounts?
I would appreciate any help on:
Thanks in advance!