谷歌驱动器API更改文件的所有权? [英] Google drive api change ownership of files?

查看:130
本文介绍了谷歌驱动器API更改文件的所有权?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Google Drive api来管理多个用户的一些文件。
现在我想知道如何将某些文件的所有权转让给其他用户。



我在查看api文档,发现我需要一个permissionId 。我不知道我需要一个。当前用户或获取它的用户?)

我不知道用户必须通过驱动器服务对用户进行身份验证,或者用户谁提供文件?

解决方案

您将只需要被授权为拥有该文件的用户,并且您将授予所有者权限给新的所有者,并通过电子邮件地址授予它。然后,您可以删除授权(以前的所有者)用户的所有者权限。您可以使用权限ID来删除此权限,该权限ID位于用户的关键Feed中。



请记住,所有权只能保留在域中。


I'm using the google drive api to manage some files of multiple users. Now I was wondering how I could transfer ownership for some Files to another user.

I was looking at the api documentation and noticed I needed a "permissionId". I don't know wich one I need. The current user or the user who gets it?)

I don't know what user has to be authenticated (with the drive service) the user who gets the files or the user who gives the files?

解决方案

You will be only need to be authorized in as the user who owns the file, and you will grant the owner permission to the new owner, and grant it by email address. Then you can remove the owner permission for the authorized (previous owner) user. You can remove this using the permission ID, which is in the about feed for the user.

Remember that ownership can only stay within the domain.

这篇关于谷歌驱动器API更改文件的所有权?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆