6
votes

Is there an option to change the sharing settings trough drive SDK?

If I add permissions at user level with a email Id. I can see the visibility perms of doc as Private. If I set permission to { 'value': None, 'type': "anyone", 'role': "writer"}. I can see the visibility perms of doc as "Public on the web".

enter image description here

Can any help, what settings can set sharing settings to Anyone with link.

The issue with public on web is we could see anonymous users are able to find the doc and we could see unknown presence on the doc..

2
Did you try by adding withLink:true? According to the API (developers.google.com/drive/v2/reference/permissions) concerning permissions, you can add more variables to define them.vicrabb

2 Answers

4
votes

Try

'value' => 'me', 'type' => 'anyone', 'role' => 'reader', 'withLink' => true

This will change sharing settings to Anyone with link.

2
votes

Try this link with the following values

'value' = 'me', 'type' = 'anyone', 'role' = 'reader'