sky*_*ind 7 php google-api google-drive-api google-oauth google-api-php-client
我有一个与 1 个用户 - 所有者(Gmail 帐户)和第二个用户 - 作者(Google 服务帐户,如 @iam.gserviceaccount.com)共享的 Google 表格文件。
我使用此函数由用户 2 从用户 1 复制表,并再次使复制文件的所有者为用户 1:
$ownerPermission = new Google_Service_Drive_Permission([
'type' => 'user',
'role' => 'owner',
'emailAddress' => 'user1@gmail.com'
]);
$requestOwnership = $service->permissions->create($newfileId, $ownerPermission, ['fields' => 'id', 'transferOwnership' => 'true']);
Run Code Online (Sandbox Code Playgroud)
直到昨天一切都运转良好!现在,Google Drive API 返回错误:需要同意才能将文件的所有权转让给其他用户
如何修复它?