0

I have been using PyDrive2 to upload files on google drive. I use the following snippet.

new_permission = {
        'emailAddress': EMAIL,
        'role': 'reader',
        'type': 'user',
        'value': EMAIL
        }
        new_dir.auth.service.permissions().insert(
            fileId=new_dir['id'], body=new_permission, supportsTeamDrives=True).execute(http=new_dir.http)

In the above snippet I provide the email of the user who I want to grant permission in emailAddress field of the new_permission dictionary.

What could be the way to give permission of a file to multiple email-addresses.

I would really appreciate if anyone could help me out here.

1 Answers1

0

permissions().insert is singular its going to grant permission for one user only.

Creates a permission for a file or shared drive

To add more then one run it once for each user.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449