Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I'm working on integrating dropbox to my company's website and we want to add a feature in to allow the users to share their shared folders to us and using the dropbox api, we upload files to the shared folder that they provided. These shared folders will be in a seperate account that the one we use on our website.
Is this possible using the dropbox api v2?
Yes, the Dropbox API does offer the ability to both share folders and upload into shared folders.
To share a folder with another account, you can use /2/sharing/share_folder to share the folder, and /2/sharing/add_folder_member to invite another account.
On the recipient account, you can list folders that you can add to the account using /2/sharing/list_mountable_folders[/continue] and then add them to your account using /2/sharing/mount_folder.
You can then upload to the folder using /2/files/upload.
We recommend using an official SDK, if one is available for your platform. They will have corresponding methods for the above endpoints.
Note that when you register the API app for this, you'll need to use the "full Dropbox" permission, not "app folder". Apps with the app folder permission can't access shared folders.
Thanks for your reply!
I saw that API endpoint too, now that confirms that i was looking at the right thing.
Next question is, how exactly would i put the path in. The path being the recipient's shared folder link.
"path": "/Homework/math/Matrices.txt",
It worked when i was saving to my account's folder path but i tried putting in the recipient's shared folder link but it didnt work.
How exactly should the format be.
Yeap that was one of the way that i tested and it worked. But i'm talking bout when a user just gives us a shared link to their folder instead of adding us to the shared user's list on the folder
Is there a way to upload to that folder with just the shared folder link that they gave us? or do we have to be given access to the folder and then we will have to use the path that we get from /2/sharing/list_folders[/continue] on our own account and then upload to that path.
Can we directly upload to the folder link that the recipient on another account gives us (image attached is the way they get the folder link)
Gotcha! Thanks Greg for answering my question!
In a request to make folder shareable, i got
REQUEST
curl -X POST https://api.dropboxapi.com/2/sharing/share_folder \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{"path":"/pictures/hello","link_settings":{}}'
RESPONSE
{ "error_summary": "no_permission/", "error": { ".tag": "no_permission" }, "user_message": { "locale": "en", "text": "You don’t have permission to perform this action." } }
What exactly am doing wrong?
@Wuyi It looks like you're running in to the issue discussed here:
Please check out that thread for information on how to avoid this. Thanks and apologies for the bother!
The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.
Sound good? Let's get started.Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on Twitter or Facebook.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!