cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Sharing - how to share a folder with edit access when don't know my friend's dropbox user id?

Sharing - how to share a folder with edit access when don't know my friend's dropbox user id?

elsigh
Helpful | Level 5
Go to solution

I have an App built on the Dropbox API (https://songdocs.io).

 

I want to send a link to a folder to a friend, and I know I can get a shared link (which gives anyone with it view permissions) and send that to them.

 

I would like to give them editable accessto the folder but a) I don't know how I would figure out their dropbox user id. Is there a way to get that? (assuming I've never shared anything with them before fwiw). I don't see anything about Contacts in the API.

 

Maybe there's another way to accomplish this though too? Totally open to suggestions here. But if user #2 has the shared view link and they gain access to it in my app is there a way for user #2 to request access to mount the folder with edit permissions somehow from my app and for me to communicate that to user #1?

25 Replies 25

elsigh
Helpful | Level 5
Go to solution

Ok, so I tried another direction.

 

I sent a shared link from user #1 to user #2 but then trying to access it as user #2:

{"error_summary": "shared_link_access_denied/..", "error": {".tag": "shared_link_access_denied"}}

 

cantdoit.png

Greg-DB
Dropbox Staff
Go to solution

@elsigh Yes, apologies for the confusion, but currently, app folders are incompatible with shared folders, meaning you can't share an app folder as a shared folder (only as a read-only link), put a shared folder inside an app folder or put an app folder in a shared folder. So, the behavior and restrictions you're seeing on the web site and desktop client are expected for app folders.

 

Instead, for any part of your app where you want to use the API with shared folders, you'll need to use "full Dropbox" permission, as opposed to the app folder permission. 

 

And the 'shared_link_access_denied' issue you mentioned appears to be the same as what you reported in this other thread. That's still open with the team.

elsigh
Helpful | Level 5
Go to solution

I feel like I'd never want to give any app (certainly some utility app) the ability to read every folder/file in my dropbox, but I'd trust almost app to a particular directory and contents within, just like I do with users.

 

This seems like an pretty unfortunate design in terms of user privacy. I can't imagine users will give my app a try if I ask to read their whole dropbox. Am I missing anything? 

 

Greg-DB
Dropbox Staff
Go to solution

No, I don't believe you're missing anything. It sounds like you have a good understanding of the Dropbox API permissions options currently available, but we appreciate the feedback. There isn't currently a way to allow an app to access only a specific pre-existing path, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. 

elsigh
Helpful | Level 5
Go to solution

Hey @Greg-DB - I've changed our app back to the full dropbox permission for now, but I have a couple more challenges trying to implement the approach we outlined before.

 

I'll start with this one since it would give two users a shared-editable folder:

Use case: User #1 adds User #2 to a folder by email in our App
  • User #1 creates a new folder (we do it in /Apps/Songbook.Studio/${newFolderName})
  • User #1 tries to invite User #2 by email to that folder using sharingAddFolderMember, but we’re stuck without sharing_info.shared_folder_id
    • The folder metadata has no sharing_info key on it. I’ve tried called sharingCreateSharedLinkWithSettings in advance. The only way I can seem to get sharing_info to be populated is if User #1 goes to the Dropbox client and adds any user by email there.

Greg-DB
Dropbox Staff
Go to solution

The 'sharing_info' is only set on a folder if the folder is itself shared as a shared folder (or is inside a shared folder). Note that this is different than the kind of sharing offered by /2/sharing/create_shared_link_with_settings. Calling /2/sharing/create_shared_link_with_settings for a folder will not make it a "shared folder"; it only creates a "shared link" for it.

 

To first share the folder as a shared folder, so that it will receive 'sharing_info' with a 'shared_folder_id' that you can then use with /2/sharing/add_folder_member, you should first call /2/sharing/share_folder

Need more support?
Who's talking

Top contributors to this post

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