Your workflow is unique 👨‍💻 -  tell us how you use Dropbox here.

Forum Discussion

Dan R.23's avatar
Dan R.23
New member | Level 1
9 years ago

Shared file link not working programatically

 I am creating an android app that downloads a shared file though normal http, not using the dropbox api.  I am creating a shared link to the file manually, then I am using that link in my app.  However, I am not getting the file back. Instead I am getting some dropbox file.  Here is the beginning of what is in the file I get:

!DOCTYPE html><html lang="en" xmlns:fb="http://ogp.me/ns/fb#" xml:lang="en" class="media-mobile" xmlns="http://www.w3.org/1999/xhtml"><head><script nonce="y2kO2oszFg5

the http download I am using works correctly on several other files on the internet, but not for any of the publicly shared dropbox file links.

The file link does work if I past it into a browser.

Not sure why dropbox dosn't return this file?  I am trying to access it just like a browser would.

Thanks, Dan

 

2 Replies

Replies have been turned off for this discussion
  • Dan R.23's avatar
    Dan R.23
    New member | Level 1
    9 years ago

    I figured it out.  the link url I was using had dl=0 at the end of it.  I had to change to dl=1.

    cheers
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago

    Hi Dan, I'm glad to hear you sorted this out already. By default, these shared links do return preview pages, but you can modify them, as you found. You can find more information here:

    https://www.dropbox.com/help/201

About Dropbox API Support and Feedback

Node avatar for Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!