79447186

Date: 2025-02-18 05:14:55
Score: 1.5
Natty:
Report link

Change file sharing permission

To change the sharing permission of a file using Drive API, use Method: permissions.create with the following request body:

{
  "role": "writer",
  "type": "anyone"
}

I tried this using the API Explorer and got the desired result.

Output

Before using the api Before api

After using the api after api

References:

Permissions.create method

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: 4thAnd1