cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Create a get_temporary_link for a folder in a team account

Create a get_temporary_link for a folder in a team account

Chillhop
Explorer | Level 3
Go to solution

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. 

Screenshot 2019-07-31 12.03.24.jpg

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

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.

View solution in original post

4 Replies 4

Greg-DB
Dropbox Staff
Go to solution

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
Explorer | Level 3
Go to solution

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

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.

Chillhop
Explorer | Level 3
Go to solution

Hi Greg thanks for the reply. You were right in pointing out the Dropbox-Api-Path-Root, as it is only specified for 1 folder in the root of the team folders. 

This was the error, i had to run my tests inside that folder. I added a screenshot in case someone runs into the same error. 

Screenshot 2019-08-03 17.17.28.jpg

thank you

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Chillhop Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?