<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Download one file in ASP.net VB in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-one-file-in-ASP-net-VB/m-p/277110#M16602</link>
    <description>1. If you have a shared link to a file, you can download it directly. Note that the link you shared in your code though points to the HTML preview page for the file, not the file data itself, so your code won't work as is.&lt;BR /&gt;&lt;BR /&gt;You can modify these links to point to the file data though, as documented here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/help/desktop-web/force-download" target="_blank"&gt;https://www.dropbox.com/help/desktop-web/force-download&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;2 Alternatively, you can use the official Dropbox API v2 .NET SDK:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-dotnet&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;With that, you can use the GetSharedLinkFile method to download a file from a shared link:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Sharing_Routes_SharingUserRoutes_GetSharedLinkFileAsync_1.htm" target="_blank"&gt;https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Sharing_Routes_SharingUserRoutes_GetSharedLinkFileAsync_1.htm&lt;/A&gt;</description>
    <pubDate>Mon, 21 May 2018 14:56:34 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2018-05-21T14:56:34Z</dc:date>
    <item>
      <title>Download one file in ASP.net VB</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-one-file-in-ASP-net-VB/m-p/277098#M16598</link>
      <description>&lt;P&gt;Good day all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm really sorry if this question has been asked before, I have searched a lot without success. I want to download one file from my own account using ASP.net, but using VB (not C#). I have downloaded the V2 API package&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; PM&amp;gt; Install-Package Dropbox.Api&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried without using the above SDK using this code. Although a file is created on my computer its full of junk.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    Protected Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click


Dim UrlPath As String = "https://www.dropbox.com/s/quswjzadmomb6xz/Linux.txt?dl=0" ' make sure you get the download path of the file in this format
        Dim DownloadToThisFilename As String = "C:\test\FileName.txt"  ' filename for the file to be downloaded to
        Try
            Using Client As New System.Net.WebClient()
                Client.DownloadFile(UrlPath, DownloadToThisFilename)
            End Using
        Catch

            MsgBox("Issues")


        End Try



    End Sub&lt;/PRE&gt;&lt;P&gt;Two solutions I think are possible and I would be happy with either&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. A VB solution that is similar to the above&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. A solution that does use the SDK, but once again written in VB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help very much appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS - its an Excel file I want to download if that makes any difference&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:13:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-one-file-in-ASP-net-VB/m-p/277098#M16598</guid>
      <dc:creator>pw200</dc:creator>
      <dc:date>2019-05-29T09:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Download one file in ASP.net VB</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-one-file-in-ASP-net-VB/m-p/277110#M16602</link>
      <description>1. If you have a shared link to a file, you can download it directly. Note that the link you shared in your code though points to the HTML preview page for the file, not the file data itself, so your code won't work as is.&lt;BR /&gt;&lt;BR /&gt;You can modify these links to point to the file data though, as documented here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/help/desktop-web/force-download" target="_blank"&gt;https://www.dropbox.com/help/desktop-web/force-download&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;2 Alternatively, you can use the official Dropbox API v2 .NET SDK:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-dotnet&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;With that, you can use the GetSharedLinkFile method to download a file from a shared link:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Sharing_Routes_SharingUserRoutes_GetSharedLinkFileAsync_1.htm" target="_blank"&gt;https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Sharing_Routes_SharingUserRoutes_GetSharedLinkFileAsync_1.htm&lt;/A&gt;</description>
      <pubDate>Mon, 21 May 2018 14:56:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-one-file-in-ASP-net-VB/m-p/277110#M16602</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-05-21T14:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Download one file in ASP.net VB</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-one-file-in-ASP-net-VB/m-p/277111#M16603</link>
      <description>&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A massive thank you for the fast and accurate reply. Just changing the 0 to a 1 at the end of the link ensured I got the file I was expecting. The SDK option is good information as well, and I have saved that link for future reference&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again thank you for taking the time to help me out, I really appreciate it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2018 15:17:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-one-file-in-ASP-net-VB/m-p/277111#M16603</guid>
      <dc:creator>pw200</dc:creator>
      <dc:date>2018-05-21T15:17:34Z</dc:date>
    </item>
  </channel>
</rss>

