Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting list of files from shared folder without user Authentication #116

Open
RishabhTayal opened this issue Sep 16, 2016 · 22 comments
Open

Comments

@RishabhTayal
Copy link

RishabhTayal commented Sep 16, 2016

Can we get list of files from a shared dropbox folder?

https://www.dropbox.com/sh/zszvaylphr411s3/AACO-nwdk-8wRqaLeAwxuXmVa?dl=0

@greg-db
Copy link
Contributor

greg-db commented Sep 16, 2016

Hi @RishabhTayal , if you have just a shared link to a folder like that, unfortunately it's not currently possible to use SwiftyDropbox to get the file listing. We'll consider this a feature request though.

@RishabhTayal
Copy link
Author

Thanks for the prompt response. Is there a way to do this through DB rest API?

@greg-db
Copy link
Contributor

greg-db commented Sep 16, 2016

Dropbox API v2, which SwiftyDropbox uses, doesn't offer this functionality.

The deprecated Dropbox API v1 does though, via the /1/metadata/link endpoint.

@RishabhTayal
Copy link
Author

cool. I will use the deprecated endpoint for now.

@RishabhTayal
Copy link
Author

I keep getting invalid client_id error in the API v1. I am not even passing a client id

@greg-db
Copy link
Contributor

greg-db commented Sep 16, 2016

Your client ID is just your app key, which is required for that endpoint. There's an example of using app authentication for that endpoint here.

@tjdhome
Copy link

tjdhome commented Sep 16, 2016

Whoa... are you guys recommending that we use a deprecated API that you plan to deactivate next year?

I too need this functionality in v2 of the API-- I -do- use /1/metadata/link in my shipping products


From: Greg K [email protected]
Sent: Friday, September 16, 2016 3:59:37 PM
To: dropbox/SwiftyDropbox
Subject: Re: [dropbox/SwiftyDropbox] Getting list of files from shared folder without user Authentication (#116)

Dropbox API v2, which SwiftyDropbox uses, doesn't offer this functionality.

The deprecated Dropbox API v1 does though, via the /1/metadata/linkhttps://www.dropbox.com/developers-v1/core/docs#metadata-link endpoint.

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/116#issuecomment-247707726, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACEbdb68gKAem2vDomh1Dt6fb5woI9Heks5qqwM5gaJpZM4J_Vyf.

@RishabhTayal
Copy link
Author

@greg-db API v1 is working for me for now. Waiting for this in v2.

@greg-db
Copy link
Contributor

greg-db commented Sep 16, 2016

I don't recommend using it in new code, as it is deprecated, but I mentioned it for reference since Rishabh asked. It is a usable workaround for now though, since v1 will continue working until June 2017.

We are tracking this as a feature request to support it in v2 as well.

@RishabhTayal
Copy link
Author

@greg-db How can we see the actual content of the file after calling the /1/metadata/link API? Trying to create UIImage from the api response file name.

@greg-db
Copy link
Contributor

greg-db commented Sep 19, 2016

The /1/metadata/link endpoint doesn't offer the ability to download file content, only the metadata.

The /2/sharing/get_shared_link_file endpoint does though. That's the getSharedLinkFile method in SwiftyDropbox.

@RishabhTayal
Copy link
Author

but in the second endpoint we need user authentication. correct?

@greg-db
Copy link
Contributor

greg-db commented Sep 19, 2016

Oh, yes, that's correct. Apologies, I forgot that you were asking for app authentication specifically. I'll send along a feature request for that as well.

@larschassing
Copy link

Any progress on this ?
Like @tjdhome I need this feature too.

@greg-db
Copy link
Contributor

greg-db commented Apr 24, 2017

@larschassing No, unfortunately I don't have an update on this.

@elcarlibertoni
Copy link

For what I can see in this post you guys will lose 4 or 5 (at least) integrations with your product because you are removing a feature without providing a replacement for the use case that it was covering. This will probably mean that other services will left aside Dropbox as a supported file source. I imagine that you had your reasons for removing that (security, performance, etc.) but if you decided to remove it because you thought that it wasn't covering a valid use case, you have people here telling you the opposite.

Just as a comment, extending the support on that endpoint until you guys provide some other way to query that data will save you from losing integrations with other external services and apps.

@greg-db
Copy link
Contributor

greg-db commented May 16, 2017

Thanks for the feedback Carlos! I'll send this along to the team.

@ElyDantas
Copy link

Any update about downloading content from a shared link without user Auth in Dropbox API v2 ?

@greg-db
Copy link
Contributor

greg-db commented Sep 8, 2017

No, unfortunately I don't have an update on that.

@greg-db
Copy link
Contributor

greg-db commented Oct 12, 2017

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. In the Swift SDK that's available as listFolder:

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

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.

@charaniachirag
Copy link

Hi , any update on this for only shared link without any authentication.

@greg-db
Copy link
Contributor

greg-db commented Jun 14, 2019

@charaniachirag No, unfortunately I don't have any news on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants