We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
LarsD
3 years agoNew member | Level 2
Get Url to Folder by ID
Hello,
so we have a list with the ids for folders in the format "id:XXXXXX".
Now I need a URL to share/open for that id.
I tried https://www.dropbox.com/developers/documentation/http/documentation#files-get_metadata but I only get the "parent_shared_folder_id".
Does anybody have a idea how that can work?
Dropbox unfortunately does not offer a way to directly get a link to a folder from an ID like this, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
There are some things that may work depending on the scenario though:
- If the folder itself happens to be a shared folder, or you are able to make it a shared folder (e.g., using /2/sharing/share_folder), you could then call /2/files/get_metadata with the 'path' set to the ID of the folder to get the 'sharing_info.shared_folder_id' which is the shared folder ID, and then call /2/sharing/get_folder_metadata with that 'shared_folder_id' to get the 'preview_url'.
- You could call /2/sharing/create_shared_link_with_settings with the 'path' set to the ID of the folder, and 'settings.audience' set to 'no_one' to get a link that would refer to the folder on the web site for anyone who has access to it, though not directly enable any additional access to it.
3 Replies
- Здравко3 years agoLegendary | Level 20
LarsD wrote:...
Now I need a URL to share/open for that id.
...
Hi LarsD,
Do you mean a shared link? 🤔 If so, you can create such link using /2/sharing/create_shared_link_with_settings API call. 😉 Just put id as path there. If link already exists for particular id, shared_link_already_exists error will get back containing the existing URL. If you know your links exist for all ids already, you can list_shared_links.
Hope this helps.
- LarsD3 years agoNew member | Level 2
Hi @Здравко,
not exactly sharing.
We have a CRM where we have customers. For each customer we have a folder in a team folder in the dropbox. And for each customer we selected the id: with the widget.
Now we want a link form our CRM to the dropbox page of these folders.
I kinda want the preview link from that:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_folder_metadata
But I don't have the right shared_folder_id.
- Greg-DB3 years ago
Dropbox Community Moderator
Dropbox unfortunately does not offer a way to directly get a link to a folder from an ID like this, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
There are some things that may work depending on the scenario though:
- If the folder itself happens to be a shared folder, or you are able to make it a shared folder (e.g., using /2/sharing/share_folder), you could then call /2/files/get_metadata with the 'path' set to the ID of the folder to get the 'sharing_info.shared_folder_id' which is the shared folder ID, and then call /2/sharing/get_folder_metadata with that 'shared_folder_id' to get the 'preview_url'.
- You could call /2/sharing/create_shared_link_with_settings with the 'path' set to the ID of the folder, and 'settings.audience' set to 'no_one' to get a link that would refer to the folder on the web site for anyone who has access to it, though not directly enable any additional access to it.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 2 hours ago
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 or Facebook.
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!