简体   繁体   中英

permission update for a file in google drive

I want to upload a file into the google drive in a particular folder and to give access to the file only to some specific email addresses.

Uploading is already done. Now I want to update the permissions of the file.

(using python)

I suggest that you follow the Python quick start Once that you have that working and you are logged in with the user who has permissions for the file. You can then go about creating new permissions for the other users using

You might want to start with a permisisons.list to see whats already there.

perms = service.permissions().list(fileId=PARENT_ID).execute()

print ("PERMISSIONS:")
for perm in perms["items"]:
    for p in perm:
        print (p, perm[p])

Then run a Permissions create on the users who are not.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM