Update Google Drive SDK (delete / insert) Owner permission 500 Error in trial version

I’m developing an application that should give the Google Apps administrator the ability to reassign ownership of files. I am currently using the Google Drive SDK for .NET with C # code.

When I authenticate with the test drive version of the Google Drive SDK at https://developers.google.com/drive/v2/reference/permissions/insert and fill out the FileIdfile that belongs to the administrator and try pasting a different owner from the same Google Apps domain, I I get 500 internal server errors. I use these values:

POST     https://www.googleapis.com/drive/v2/files/0B1Y4_hVm0vbESlZuZHhBemtjcXM/permissions?key={YOUR_API_KEY}

Content-Type:  application/json
Authorization:  Bearer {MY_ACCESSTOKEN}
X-JavaScript-User-Agent:  Google APIs Explorer

{
 "role": "owner",
 "type": "user",
 "value": "user@mydomain.com"
}

Try It demo picks me up using scopes

  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file

    to perform this operation.

, Try It, admin, delete.

SDK Google Drive, , API Google Docs , , . .

- ? , ?

+5
3

, , , .

Google Apps , API 500 .

, .

+1

transferOwnership .

python api :

service.permissions().patch(
        fileId=doc.drive_id, permissionId=permission_id,
        body=patched_permission, transferOwnership=True).execute()
0

. , , . , Google .

, .

0
source

All Articles