cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right 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: 

Re: Access public shared files without authentication

Access public shared files without authentication

dredknight
Explorer | Level 4
Go to solution

Dear community,

 

I was wondering if it is possible to use a the ruby dropbox API to access and download publically shared files without authentication?

You can do that from the web as long as you have the URL but I could not find any way to make this possible inside my app.

Any help on how I can make this work will be appreciated :)!

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution
If you have a shared link for the file, the simplest way to download it is to modify the URL parameter(s) as shown here:

https://www.dropbox.com/help/desktop-web/force-download

You can then download from the modified link.

Otherwise, if you do want to use the API, you can use the /2/sharing/get_shared_link_file endpoint:

https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_shared_link_file

View solution in original post

5 Replies 5

Mark
Super User II
Go to solution
*moves to API forum*

 


:penguin::penguin: - :penguin: - :penguin: - :penguin:


Heart Did this post help you? If so please mark it for some Kudos below. 


:white_check_mark: Did this post fix your issue/answer your question? If so please press the 'Accept as Solution' button to help others find it.


:arrows_counterclockwise: Did this post not resolve your issue? If so please give us some more information so we can try and help - please remember we cannot see over your shoulder so be as descriptive as possible! 


 

Greg-DB
Dropbox Staff
Go to solution
If you have a shared link for the file, the simplest way to download it is to modify the URL parameter(s) as shown here:

https://www.dropbox.com/help/desktop-web/force-download

You can then download from the modified link.

Otherwise, if you do want to use the API, you can use the /2/sharing/get_shared_link_file endpoint:

https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_shared_link_file

dredknight
Explorer | Level 4
Go to solution

Oh.. this DL=1 is just what I needed! Thank you so much :)!

P.S.


Unfortunately when I put it as a download link in ruby it still does not work even though it works through brower. :confused_face:

Greg-DB
Dropbox Staff
Go to solution
How does it fail exactly? Can you share your code?

One thing to be aware of is that the dl=1 link will return a redirect first, so make sure your HTTP client will follow redirects.

dredknight
Explorer | Level 4
Go to solution

Hello Greg,

 


Your answer is correct, it is me who is faulty.

It seems the dl=1 solution is not a direct link but when requested it sends a response with the direct link.

I had to work this over with ruby so I can tell ruby to get the request and THEN use it as download source.


Thank you for the help and dedication!

Need more support?