We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Suporte S.
10 years agoNew member | Level 1
share file inside a folder by id
Hi.
I'm trying to share a file by his id.
If the file it's on the root folder, using '/create_shared_link_with_settings' i can pass only the id, and testing on the api explorer works fine.
So, ...
Greg-DB
Dropbox Community Moderator
10 years agoIf you want to create a shared link for a file and you know the id for the file, you can just use that, as opposed to trying to combine path and id. That is, if "id:h8f3g764f73gf7fg" is the id for a file at /myfolder/myfile that you want a shared link for, you can just use the id only:
curl -X POST https://api.dropboxapi.com/2/sharing/create_shared_link_with_settings \
--header 'Authorization: Bearer my-key' \
--header 'Content-Type: application/json' \
--data '{"path":"id:h8f3g764f73gf7fg","settings":{}}'About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!