You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Chillhop's avatar
Chillhop
Explorer | Level 3
6 years ago

Create a get_temporary_link for a folder in a team account

Hi,

Im trying to create a public link from the API, the account where the folder is lodged is a Business account, when I try to share the folder I get "permission denied" error. 

The main idea is that with a link anyone may download the contents of the folder (zip or single files). Also I would like to set an expiration date or time on the link. 

I am able to create the link but only for private use or members of the team account. 

  • Greg-DB's avatar
    Greg-DB
    6 years ago

    Are you sure you have both the right path, as well as the right namespace (in the "Dropbox-Api-Path-Root" header)? I can't see the full values from your screenshot. 

    If you'd like us to check on this specifically for you, please feel free to open an API ticket with the full code (use the "Show Code" button), but please redact the access token.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    It looks like there are a few different pieces of functionality here that you may be referring to, so first, to clarify:

    • You mention the 'get_temporary_link' endpoint in your post title. That refers to the /2/files/get_temporary_link endpoint. That can only be used to get temporary direct links to individual files, but it sounds like you want to get a link to a folder, so that wouldn't work for your use case.
    • Your screenshot appears to show an attempt to use the /2/sharing/share_folder endpoint. That's a way to share a folder with other Dropbox users directly, not via a link. It sounds like you want a link, so that wouldn't be the correct endpoint to use.
    • If you want to get a shared link to a folder, you should use the the /2/sharing/create_shared_link_with_settings endpoint.

    Regardless of what sharing method you use, you will be subject to whatever access and sharing controls have been set for your team (such as the ones mentioned here).

    Based on your description, try using /2/sharing/create_shared_link_with_settings. If that isn't working as expected, let us know.

    • Chillhop's avatar
      Chillhop
      Explorer | Level 3

      Hi, thank you for the update. But I tried the /2/sharing/create_shared_link_with_settings endpoint and it only gives the error "path/not_found/" I tried with several files and folders. I know the paths are correct since I use the same paths for other API calls. 

      Screenshot 2019-08-01 10.29.49.jpg

      Maybe this is a bug on your end? 

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        Are you sure you have both the right path, as well as the right namespace (in the "Dropbox-Api-Path-Root" header)? I can't see the full values from your screenshot. 

        If you'd like us to check on this specifically for you, please feel free to open an API ticket with the full code (use the "Show Code" button), but please redact the access token.