cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to update shared folder link access from edit to view

How to update shared folder link access from edit to view

journeymigration
Helpful | Level 5
Go to solution

I've successfully created a backend service to update shared folder member access to view only; however, the the shared folder link is still set to Edit access. I thought using the https://api.dropboxapi.com/2/sharing/modify_shared_link_settings endpoint would do the trick passing in the following parameters:

 

{
"settings": {
"requested_visibility": "public",
"audience": "public",
"access": "viewer"
},
"remove_expiration": false
}
 
Folder still shows edit access however for the shared link
1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

Whether or not you need to revoke the edit link will depend on your use case; it's not required for creating a view link. To revoke a link you'd use /2/sharing/revoke_shared_link. Whether or not you do revoke the edit link, you can create the view link using /2/sharing/create_shared_link_with_settings.

View solution in original post

5 Replies 5

Greg-DB
Dropbox Staff
Go to solution

Thanks for the post. We'll look into this and get back to you.

Greg-DB
Dropbox Staff
Go to solution

The Dropbox API doesn't support changing the access level on an existing link like this, but it looks like the API isn't properly reporting that back in the /2/sharing/modify_shared_link_settings response. I've asked the team to fix that up.

 

That being the case, if you need a view link instead of an edit link, you'll need to create a new view link instead.

journeymigration
Helpful | Level 5
Go to solution

So in effect, would I remove the share link and then use the API to create a view link and that'd effectively do the same thing?

Greg-DB
Dropbox Staff
Go to solution

Whether or not you need to revoke the edit link will depend on your use case; it's not required for creating a view link. To revoke a link you'd use /2/sharing/revoke_shared_link. Whether or not you do revoke the edit link, you can create the view link using /2/sharing/create_shared_link_with_settings.

journeymigration
Helpful | Level 5
Go to solution

Here's how I'm revoking and then creating the link in a Console application:

await client.Sharing.RevokeSharedLinkAsync(url);
          SharedLinkSettings settings = new SharedLinkSettings(access: RequestedLinkAccessLevel.Viewer.Instance);
          await client.Sharing.CreateSharedLinkWithSettingsAsync(sharedFolderPath,settings);

 

This appears to work on my end, thank you.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    journeymigration Helpful | Level 5
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?