I was not able to find the Python implementation of the "shared link metadata" endpoint to do what is listed here: https://blogs.dropbox.com/developers/2015/08/new-api-endpoint-shared-link-metadata/
A minimal Python working example for the three presented cases would be very useful!
That blog post is about a Core API (a.k.a. API v1) endpoint that's unfortunately not implemented in the Python Core API SDK.
You can instead use API v2, where the equivalent endpoint is /sharing/get_shared_link_metadata though. That's implemented in the Python API v2 SDK as the sharing_get_shared_link_metadata method.
Thank you so much for the quick answer!
I have a follow on question: do I need to give a 'Full Permission' to the app to use that method? or is 'Apps Folder' permission enough?
I believe /sharing/get_shared_link_metadata also works for app folder apps, but only for links to items inside the app folder.
A shared link within the app folder works! I believe that this particular behavior should be described in the API documentation. I have been attempting to do with a generic shared link for a while before ending up to open a discussion here. To be honest, I am not totally sure that I got the logic beyond the approach. What is the use case of retrieving metadata from a shared link to a folder that is already in the app folder?
In my use case, I would like to download files from a 'generic' shared link to a folder (since I don't want to provide the malicious user with an easy way to hack these files). I mean: I want to put some files in a folder on my Dropbox, then hard code the shared link in an application that can use the shared link to (only) download the files that I put on the folder. Can I do this with the current APIs? If not, do you have plans to implement it?
We definitely should improve the documentation around this. I've sent this along to the team to do so.
I imagine there may be several use cases for retrieving metadata about a file it already has access to, e.g., if it doesn't know and needs to look up the original file path.
Anyway, please give it a try, but I don't think your exact use case is currently supported on that endpoint. I can't make any promises, but I've sent this along as a request.