cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you new to Dropbox? Our Newcomers group is the perfect place to learn the basics, find out more 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: 

Get Url to Folder by ID

Get Url to Folder by ID

LarsD
New member | Level 2
Go to solution

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?

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

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.

View solution in original post

3 Replies 3

Здравко
Legendary | Level 20
Go to solution

@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.

LarsD
New member | Level 2
Go to solution

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-DB
Dropbox Staff
Go to solution

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.
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    LarsD New member | Level 2
  • User avatar
    Здравко Legendary | Level 20
What do Dropbox user levels mean?