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: 

Sharing an app folder

Sharing an app folder

larschassing
Helpful | Level 6
Go to solution

I would like to create an iOS app that saves some voice recordings into an app folder.

Then the iOS app should mail a link to the app folder to other users, who (using the same iOS app) should be able to listen to the recordings.

1) Using Swiftydropbox I cannot create a shared link to the app folder, "" is not supported, I can only obtain a link to a specific file like "/Recording1.m4a".

2) I cannot use Swiftydropbox with just such a link to download the file.

 

I would like to be able to pass a link to the app folder to Swiftydropbox and use it for downloading new recordings.

 

Would that be possible?

 

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution
Unfortunately the Dropbox API just happens to not have the particular functionality you're looking for. I've sent this along as feedback, but I can't promise if or when any of this functionality would be implemented.

View solution in original post

9 Replies 9

Greg-DB
Dropbox Staff
Go to solution

1. The Dropbox API doesn't allow an app with the app folder permission to create a shared link for its own app folder. Instead, you could make a subfolder, e.g., "/Recordings" (or whatever you'd like), and then get a shared link for that folder.

 

2. You can download the file from a shared link using the getSharedLinkFile method. Note that if you supply the link to a folder, you'll also need to know the sub-path of the specific file you want, and supply it to the "path" parameter.. 

larschassing
Helpful | Level 6
Go to solution

Thank you for the quick reply.

 

1. Yes, I also thought of the idea of creating a dummy folder

What is the reason that the Dropbox API doesn't allow an app with the app folder permission to create a shared link for its own app folder?

 

2. But don't you still need to authenticate to use the getSharedLinkFile ?

In my app I would like record, login and upload a recording to Dropbox, then mail a shared link to the recording folder to my friend.

My friend would like to initialize Swiftydropbox with the shared link to my folder, not login but just enumerate the files in the folder including metadata rev, and then download any new/changed files using the otherwise very useful and well designed Swiftydropbox framework.

Greg-DB
Dropbox Staff
Go to solution
1. The Dropbox API doesn't support creating a shared link for the root path, but I'll be sure to pass this along as a feature request. (In the case of an app folder app, the app folder itself is "root".)

2. Yes, the getSharedLinkFile does require user auth, so it sounds like that won't be a good solution for you.

Alternatively, if you send links for individual files instead of the folder itself, you can modify the links for direct file access, without using the API:

https://www.dropbox.com/help/201

larschassing
Helpful | Level 6
Go to solution

1. Great, thanks

 

2. Do you know if it is at all possible to obtain metadata (rev, clientModified, serverModified, etc.) for a shared link ?

Or to enumerate files in a shared folder ?

If not, then Dropbox might not be the platform for me.

 

The idea is, that my friend would occasionally check the link to my app folder to see if I have made any new recordings or modified one.

 

Using the powerful SwiftyDropbox at my friends side would have been extremely useful to me.

 

I hope you understand the functionality I'm seeking, and you will consider if it is something Dropbox will support

Thanks,

/Lars

 

Greg-DB
Dropbox Staff
Go to solution

2. You can use getSharedLinkMetadata to get the metadata, but that also requires user auth, like getSharedLinkFile.

 

The API unfortunately doesn't offer a way enumerate the contents of a folder via a shared link for the folder.

larschassing
Helpful | Level 6
Go to solution

I get the feeling that my suggested scenario in some way violates the business model of Dropbox.

Why isn't it possible for my friend to see the files including metadata in my app folder without auth ?

 

Greg-DB
Dropbox Staff
Go to solution
Unfortunately the Dropbox API just happens to not have the particular functionality you're looking for. I've sent this along as feedback, but I can't promise if or when any of this functionality would be implemented.

larschassing
Helpful | Level 6
Go to solution

Hi Greg,

thank you for your help and considerations.

I sincerely hope that the functionality I'm seeking is reasonable and that you will support it in the great SwiftyDropbox

Thanks,

/Lars

 

Greg-DB
Dropbox Staff
Go to solution
Dropbox API v2 now supports listing the contents of a shared link for a folder. This can be accomplished using the same interface as listing a folder in a connected user's account, via the list_folder functionality. To list the contents of a shared link for a folder, you instead provide the shared link URL in the `shared_link` parameter to list_folder:

https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder

If you're using an official SDK, there will also be a corresponding method for this endpoint:

In the Swift SDK that's available as `listFolder`:

https://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/FilesRoutes.html#/s:13SwiftyDropbox1...

Note that this only supports user authentication, not app authentication, so you will need an access token to make this call. Support for app authentication for this is open as a request with the team, but I can't promise if/when that would be implemented.
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    larschassing Helpful | Level 6
What do Dropbox user levels mean?