Hi.Can i get the direct links to files, stored on Dropbox, with APIv2 similarly to APIv1 (
https://content.dropboxapi.com/1/files/auto/
) so that i can reuse my code? Thank you for your help.Eugene
Hi Eugene, yes, you can still construct an API v2 call for a "content-download" endpoint like this using just a URL. You can find information on this in the formats section of the documentation. For example, for the /2/files/download endpoint, instead of the typical way as shown in the example:
curl -X POST https://content.dropboxapi.com/2/files/download \ --header "Authorization: Bearer <ACCESS_TOKEN>" \ --header "Dropbox-API-Arg: {\"path\": \"/test.mov\"}"
you can do this:
curl "https://content.dropboxapi.com/2/files/download?arg={"path": "/test.mov"}&authorization=Bearer <ACCESS_TOKEN>"
Alternatively, you can use /2/files/get_temporary_link to get a temporary direct link, like this:
curl -X POST https://api.dropboxapi.com/2/files/get_temporary_link \ --header "Authorization: Bearer <ACCESS_TOKEN>" \ --header "Content-Type: application/json" \ --data "{\"path\": \"/test.mov\"}"
Hope this helps!
Hello Gregory.
Thank you. It helped a lot.
Have a nice day!
Eugene