Reputation: 1708
I am working on a chrome extension wherein the users can store the files in their dropbox account. As mentioned in the dropbox api share file link, I used that endpoint to generate a file sharing link which generates a compressed/shortened sharing url like https://db.tt/c0mFuu1Y
. Now my query is that how can I use the dropbox api to get the contents of the file using this shared link, somewhat like what happens here for the files owned by the user.
Upvotes: 0
Views: 488
Reputation: 60143
See https://www.dropbox.com/help/201.
If you have a shortened link, like the example you gave, you'll want to fetch that first and get the Location
header on the 302 response. That will give you the full (non-shortened) share link. From there, you can apply the technique described in the link above... add the ?raw=1
query parameter and just download the contents.
Upvotes: 0