<?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: Problem downloading file using Dropbox-provided URL in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691088#M30974</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1713624"&gt;@HairyWombat&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;... My app does not use Dropbox API and successfully downloads files from other websites but, if my app changes ?dl=0 to ?dl=1 in the url (as suggested by Dropbox docs), the download does not succeed and instead my app receives a small html file saying there is a problem at Dropbox and they will get back to me. Shouldn't this work? ...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1713624"&gt;@HairyWombat&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;This should work, if your web client support redirection and the redirection is not forbidden. Dropbox links don't point the target file directly, but make 2 redirects before that. That's why if your client doesn't support redirection, your download is likely to finish in such a way. Make sure redirects are supported properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1713624"&gt;@HairyWombat&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;..., is there a way in the Dropbox API to download a file from a url like&amp;nbsp;&lt;A href="https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1&lt;/A&gt; ?&amp;nbsp;&amp;nbsp;That is, when the filename is unknown.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes, there is such a way. The API access point &lt;A title="Download the shared link's file from a user's Dropbox." href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_shared_link_file" target="_blank" rel="noopener"&gt;/2/sharing/get_shared_link_file&lt;/A&gt; gives you the file metadata and downloads the content. Using this access point doesn't suppose redirection support and you can provide the link as is (without replacing ?dl=0 to ?dl=1 etc.). The drawback is that application authentication is not yet supported here (i.e. your application has to be user authenticated - explicitly signed in user and OAuth flow - doesn't matter that it's meaningless).&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Jun 2023 13:47:21 GMT</pubDate>
    <dc:creator>Здравко</dc:creator>
    <dc:date>2023-06-12T13:47:21Z</dc:date>
    <item>
      <title>Problem downloading file using Dropbox-provided URL</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691074#M30971</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. I'm developing an app for iOS and Android. Users can enter the url of a file they would like to download. They might choose a Dropbox url like&amp;nbsp;&lt;A href="https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=0" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=0&lt;/A&gt;. My app does not use Dropbox API and successfully downloads files from other websites but, if my app changes ?dl=0 to ?dl=1 in the url (as suggested by Dropbox docs), the download does not succeed and instead my app receives a small html file saying there is a problem at Dropbox and they will get back to me. Shouldn't this work? It works in a web browser if I make this substitution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. If this is not supposed to work, is there a way in the Dropbox API to download a file from a url like&amp;nbsp;&lt;A href="https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1" target="_blank"&gt;https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1&lt;/A&gt; ?&amp;nbsp;&amp;nbsp;That is, when the filename is unknown.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Bill&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 12:47:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691074#M30971</guid>
      <dc:creator>HairyWombat</dc:creator>
      <dc:date>2023-06-12T12:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem downloading file using Dropbox-provided URL</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691075#M30972</link>
      <description>&lt;P&gt;I mean, when the path to the file is unknown.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 12:50:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691075#M30972</guid>
      <dc:creator>HairyWombat</dc:creator>
      <dc:date>2023-06-12T12:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem downloading file using Dropbox-provided URL</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691087#M30973</link>
      <description>&lt;P&gt;Yes, you should be able to download with ?dl=1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was unable to reproduce the reported issue, by using cURL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you provide detailed steps on how to reproduce the issue you are experiencing? For example, the code snippet you are using to reproduce the issue.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 13:43:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691087#M30973</guid>
      <dc:creator>DB-Des</dc:creator>
      <dc:date>2023-06-12T13:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem downloading file using Dropbox-provided URL</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691088#M30974</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1713624"&gt;@HairyWombat&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;... My app does not use Dropbox API and successfully downloads files from other websites but, if my app changes ?dl=0 to ?dl=1 in the url (as suggested by Dropbox docs), the download does not succeed and instead my app receives a small html file saying there is a problem at Dropbox and they will get back to me. Shouldn't this work? ...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1713624"&gt;@HairyWombat&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;This should work, if your web client support redirection and the redirection is not forbidden. Dropbox links don't point the target file directly, but make 2 redirects before that. That's why if your client doesn't support redirection, your download is likely to finish in such a way. Make sure redirects are supported properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1713624"&gt;@HairyWombat&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;..., is there a way in the Dropbox API to download a file from a url like&amp;nbsp;&lt;A href="https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1&lt;/A&gt; ?&amp;nbsp;&amp;nbsp;That is, when the filename is unknown.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes, there is such a way. The API access point &lt;A title="Download the shared link's file from a user's Dropbox." href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_shared_link_file" target="_blank" rel="noopener"&gt;/2/sharing/get_shared_link_file&lt;/A&gt; gives you the file metadata and downloads the content. Using this access point doesn't suppose redirection support and you can provide the link as is (without replacing ?dl=0 to ?dl=1 etc.). The drawback is that application authentication is not yet supported here (i.e. your application has to be user authenticated - explicitly signed in user and OAuth flow - doesn't matter that it's meaningless).&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 13:47:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691088#M30974</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-06-12T13:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem downloading file using Dropbox-provided URL</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691098#M30976</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1517679"&gt;@DB-Des&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;I was unable to reproduce the reported issue, by using cURL.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Don't let your cURL to redirect (remove the L flag). Does it work correctly still? &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 14:09:50 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691098#M30976</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-06-12T14:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem downloading file using Dropbox-provided URL</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691310#M30978</link>
      <description>&lt;P&gt;Thanks, iMonkia, for the very prompt and helpful response! Love your wolf icon btw.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use curl -L, I get 'no matches found'. However this same url downloads correctly in a web browser. You might try it yourself with my sample url&amp;nbsp;&lt;A href="https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The command line transcript is below. I've also attached my C# .NET 7.0.1 code. It is allowing redirection as best I can see.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My test file ReplacementDatabase.dbf is in a Dropbox subdirectory, not at top level, if that matters. Any suggestion appreciated. &amp;nbsp; &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@FBF7D2AB59A0D6E861EBF6A36F93B7E2/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Bill&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Last login: Tue Jun 13 11:14:00 on ttys000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;bill@Bills-MBP-10 ~ % cd desktop&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;bill@Bills-MBP-10 desktop % ls Test.dbf&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ls: Test.dbf: No such file or directory&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;bill@Bills-MBP-10 desktop % curl &lt;A href="https://billfulton.github.io/ReplacementDatabase.dbf" target="_blank" rel="noopener"&gt;https://billfulton.github.io/ReplacementDatabase.dbf&lt;/A&gt; &amp;gt; Test.dbf&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;% Total&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;% Received % Xferd&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;Average Speed &lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;Time&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;Time &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;Time&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;Current&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;Dload&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;Upload &lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;Total &lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;Spent&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;Left&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;Speed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;100&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;671k&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;100&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;671k&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;0 &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;0&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;1045k&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;0 --:--:-- --:--:-- --:--:-- 1064k&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;bill@Bills-MBP-10 desktop % ls -l Test.dbf&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-rw-r--r--&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;1 bill&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;staff&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;687752 13 Jun 11:31 Test.dbf&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;bill@Bills-MBP-10 desktop %&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;bill@Bills-MBP-10 desktop %&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;bill@Bills-MBP-10 desktop % curl -L &lt;A href="https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1&lt;/A&gt; &amp;gt; Test1.dbf&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;zsh: no matches found: &lt;A href="https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;bill@Bills-MBP-10 desktop % curl -L &lt;A href="https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;zsh: no matches found: &lt;A href="https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;bill@Bills-MBP-10 desktop % curl &lt;A href="https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;zsh: no matches found: &lt;A href="https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;bill@Bills-MBP-10 desktop % curl -L --max-redirs 20 &lt;A href="https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1&lt;/A&gt; &amp;gt; Test2.dbf&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;zsh: no matches found: &lt;A href="https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;bill@Bills-MBP-10 desktop %&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---------------------------------&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;// Initialise httpClient&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;httpClientHandler = new HttpClientHandler&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; AllowAutoRedirect = true,// Allegedly the default, but to make sure&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; MaxAutomaticRedirections = 20&lt;/DIV&gt;&lt;DIV&gt;};&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;httpClient = new HttpClient ( httpClientHandler );&lt;/DIV&gt;&lt;DIV&gt;httpClient.Timeout = TimeSpan.FromSeconds ( 60 );&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;// Accept all languages&lt;/DIV&gt;&lt;DIV&gt;httpClient.DefaultRequestHeaders.AcceptLanguage.Clear();&lt;/DIV&gt;&lt;DIV&gt;httpClient.DefaultRequestHeaders.AcceptLanguage.Add ( new System.Net.Http.Headers.StringWithQualityHeaderValue ( "*" ) );&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;// Accept binary data&lt;/DIV&gt;&lt;DIV&gt;httpClient.DefaultRequestHeaders.Accept.Add ( new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue ( "application/octet-stream" ) );&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;---------------------------------&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;public static async Task&amp;lt;byte []&amp;gt; ReadWebFileBinaryAsync ( HttpClient httpClient, string webUrl )&lt;/DIV&gt;&lt;DIV&gt;// Returns byte array from given file URL&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; byte [] bytes;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; try&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Force Dropbox url for testing purposes - to be removed&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; webUrl = "&lt;A href="https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1&lt;/A&gt;"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HttpResponseMessage response = await httpClient.GetAsync ( webUrl );&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using ( MemoryStream memoryStream = new MemoryStream () )&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using ( Stream stream = await response.Content.ReadAsStreamAsync () )&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stream.CopyTo ( memoryStream );&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; memoryStream.Seek ( 0, SeekOrigin.Begin );&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytes = memoryStream.ToArray ();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return bytes;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; catch ( Exception ex )&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // ...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;---------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 02:42:10 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691310#M30978</guid>
      <dc:creator>HairyWombat</dc:creator>
      <dc:date>2023-06-13T02:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem downloading file using Dropbox-provided URL</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691323#M30979</link>
      <description>&lt;P&gt;Further info:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with a file that sin the Dropbox root folder, but it didn't help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the html string that I am receiving (Error 400):&lt;/P&gt;&lt;P&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;BR /&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;lt;head&amp;gt;&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt;&lt;BR /&gt;&amp;lt;meta name="viewport" content="width=device-width, initial-scale=1" /&amp;gt;&lt;BR /&gt;&amp;lt;title&amp;gt;Dropbox - 400&amp;lt;/title&amp;gt;&lt;BR /&gt;&amp;lt;link href="&lt;A href="https://cfl.dropboxstatic.com/static/metaserver/static/css/error.css" target="_blank"&gt;https://cfl.dropboxstatic.com/static/metaserver/static/css/error.css&lt;/A&gt;" rel="stylesheet" type="text/css"/&amp;gt;&lt;BR /&gt;&amp;lt;link rel="shortcut icon" href="&lt;A href="https://cfl.dropboxstatic.com/static/images/favicon.ico" target="_blank"&gt;https://cfl.dropboxstatic.com/static/images/favicon.ico&lt;/A&gt;"/&amp;gt;&lt;BR /&gt;&amp;lt;/head&amp;gt;&lt;BR /&gt;&amp;lt;body&amp;gt;&lt;BR /&gt;&amp;lt;div class="figure"&amp;gt;&lt;BR /&gt;&amp;lt;img src="&lt;A href="https://assets.dropbox.com/www/en-us/illustrations/spot/target-miss.svg" target="_blank"&gt;https://assets.dropbox.com/www/en-us/illustrations/spot/target-miss.svg&lt;/A&gt;" alt="Error: 400"/&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;div id="errorbox"&amp;gt;&lt;BR /&gt;&amp;lt;h1&amp;gt;Error (400)&amp;lt;/h1&amp;gt;Something went wrong. Don't worry, your files are still safe and the Dropbox team has been notified. Check out our &amp;lt;a href="&lt;A href="https://status.dropbox.com" target="_blank"&gt;https://status.dropbox.com&lt;/A&gt;"&amp;gt;Status Page&amp;lt;/a&amp;gt; to see if there is a known incident, our &amp;lt;a href="&lt;A href="https://www.dropbox.com/help" target="_blank"&gt;https://www.dropbox.com/help&lt;/A&gt;"&amp;gt;Help Center&amp;lt;/a&amp;gt; and &amp;lt;a href="&lt;A href="https://forums.dropbox.com" target="_blank"&gt;https://forums.dropbox.com&lt;/A&gt;"&amp;gt;forums&amp;lt;/a&amp;gt; for help, or head back to &amp;lt;a href="&lt;A href="https://www.dropbox.com/home" target="_blank"&gt;https://www.dropbox.com/home&lt;/A&gt;"&amp;gt;home&amp;lt;/a&amp;gt;.&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 05:45:44 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691323#M30979</guid>
      <dc:creator>HairyWombat</dc:creator>
      <dc:date>2023-06-13T05:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem downloading file using Dropbox-provided URL</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691380#M30982</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1713624"&gt;@HairyWombat&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;On my side it works as expected:&lt;/P&gt;&lt;PRE&gt;curl -L https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1 &amp;gt; Test1.dbf
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    17    0    17    0     0      2      0 --:--:--  0:00:06 --:--:--     4
100   363  100   363    0     0     52      0  0:00:06  0:00:06 --:--:--    52
100  671k  100  671k    0     0  68064      0  0:00:10  0:00:10 --:--:--  267k&lt;/PRE&gt;&lt;P&gt;As expected, there are 3 transactions - 2 redirections and the last one is actual download. You can try verbose output (flag v) for more info:&lt;/P&gt;&lt;PRE&gt;curl -Lv https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1 &amp;gt; Test1.dbf&lt;/PRE&gt;&lt;P&gt;Here - in the detailed output, you should be able see what's going wrong on your side.&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add: A trick code that works for me:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;namespace Dropbox
{
  using System;
  using System.IO;
  using System.Net;
  
   internal class Program
   {
      static void Main(string[] args)
      {
         if (args.Length != 1) {
           Console.WriteLine(
             "Expected one Dropbox URL as a single command parameter!");
           return;
         }
         //"https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1";
         string webUrl = args[0];
         var request = WebRequest.Create(webUrl);
         var response = request.GetResponse();
         var ContentDisposition = response.Headers["Content-Disposition"];
         var dispositions = ContentDisposition.Split(';');
         string fileName = "Test.bin"; // default name
         string disposeName = "filename";
         var disposeLength = disposeName.Length;
         for(int i = 0; i &amp;lt; dispositions.Length; ++i) {
           var disposition = dispositions[i].Trim();
           if (string.Compare(disposition, 0,
                              disposeName, 0, disposeLength, true) == 0) {
              if (string.Compare(disposition, disposeLength, "=\"", 0, 2) == 0
                &amp;amp;&amp;amp; disposition[disposition.Length-1] == '"')
                fileName = disposition.Substring(disposeLength + 2,
                              disposition.Length - disposeLength - 3);
              else if (string.Compare(disposition, disposeLength,
                                      "*=UTF-8''", 0, 9) == 0)
                fileName = disposition.Substring(disposeLength + 9);
           }
         }
         Console.WriteLine("fileName: " + fileName);
         var ContentLength = response.ContentLength;
         Console.WriteLine("ContentLength: " + ContentLength);
         FileStream fs = new FileStream(fileName, FileMode.Create,
                                        FileAccess.Write);
         int bufLength = Math.Min((int)ContentLength, 0x10000);
         var buffer = new byte[bufLength];
         var readStream = response.GetResponseStream();
         int readed = readStream.Read(buffer, 0, bufLength);
         int consumed = 0;
         while(readed &amp;gt; 0) {
           consumed += readed;
           fs.Write(buffer, 0, readed);
           readed = readStream.Read(buffer, 0, bufLength);
         }
         readStream.Close();
         fs.Close();
         Console.WriteLine("Downloaded: " + consumed);
      }
   }
}&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 13 Jun 2023 16:23:28 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691380#M30982</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-06-13T16:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem downloading file using Dropbox-provided URL</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691401#M30983</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1713624"&gt;@HairyWombat&lt;/a&gt; The "zsh: no matches found" error you're getting is because the URL contains the "?" character which has a special meaning in that shell. To avoid that, quote the URL, like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl -L "https://www.dropbox.com/s/fzv989hz5mazhqw/ReplacementDatabase.dbf?dl=1" &amp;gt; Test1.dbf&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also put together your C# code and tried downloading the file from the shared link with that, and I did successfully get the expected 687752 bytes of the file back.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're getting back that HTML 400 error page, that may indicate that the HTTP request was malformed, causing the Dropbox servers to be unable to understand the request. Is there anything on your .NET environment or your network connection itself, such as a proxy, VPN, firewall, etc., that may be interfering with or modifying these requests?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 13:32:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691401#M30983</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-06-13T13:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem downloading file using Dropbox-provided URL</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691896#M31009</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hey I really appreciate the effort you and the team have put in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I found was:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Yes, curl works with the url - I switched from Mac to Windows and curl worked. Bash both times.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Fiddler also works with the URL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. My published code fails using automatic redirect. It works for you - the difference may be that I'm using Microsoft Xamarin on Mac.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. In the second redirect, Dropbox proposes&amp;nbsp;&lt;A href="https://uc012d2e25383f12de25c9db8029.dl.dropboxusercontent.com/cd/0/get/B-Dfp2veRgmAiBVuB2GBdOb2SPrjBQh9t0CkeebfBm8SdzO4_8rntEJaHCvdDqpc6-v3DZF5AGyupcRw9SOyfq8l_wlZmj63OWNOQpPgmBUcisawx6C0OptaJHDM9IoDPKvPtxaegRX8av8D36sJb1hcObvW7harZlcWcGjIqXz0aw/file?dl=1#" target="_blank"&gt;https://uc012d2e25383f12de25c9db8029.dl.dropboxusercontent.com/cd/0/get/B-Dfp2veRgmAiBVuB2GBdOb2SPrjBQh9t0CkeebfBm8SdzO4_8rntEJaHCvdDqpc6-v3DZF5AGyupcRw9SOyfq8l_wlZmj63OWNOQpPgmBUcisawx6C0OptaJHDM9IoDPKvPtxaegRX8av8D36sJb1hcObvW7harZlcWcGjIqXz0aw/file?dl=1#&lt;/A&gt;&amp;nbsp; &amp;nbsp; -- which strictly speaking is not a valid url because of the trailing #.&lt;/P&gt;&lt;P&gt;5. I solved the problem by handling the redirects myself and url-encoding the #.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, Xamarin could do better. But also, Dropbox really should not be sending invalid urls. &amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@FBF7D2AB59A0D6E861EBF6A36F93B7E2/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code below fyi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Bill&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;----------------------&lt;/P&gt;&lt;DIV&gt;httpClientHandler = new HttpClientHandler&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;AllowAutoRedirect = false&lt;/DIV&gt;&lt;DIV&gt;};&lt;/DIV&gt;&lt;P&gt;----------------------&lt;/P&gt;&lt;DIV&gt;try&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; // Here change ?dl=0 to ?dl=1 &amp;nbsp; *****&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; // webUrl = "&lt;A href="https://www.howsmyssl.com/a/check" target="_blank"&gt;https://www.howsmyssl.com/a/check&lt;/A&gt;"; &amp;nbsp; &amp;nbsp;// Debug - to check TLS version. It is TLS 1.2. (June 2023)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; HttpResponseMessage response = await httpClient.GetAsync ( webUrl );&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; int redirectCount = 0;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; while ( redirectCount &amp;lt; 20 )&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ( response.StatusCode == HttpStatusCode.Redirect )&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string redirectUrl;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ( response.Headers != null &amp;amp;&amp;amp; response.Headers.Location != null )&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ( response.Headers.Location.IsAbsoluteUri )&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; redirectUrl = response.Headers.Location.AbsoluteUri;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string[] splits = webUrl.Split ('/' );&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; redirectUrl = "https://" + splits [2] + response.Headers.Location.OriginalString;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;redirectUrl = redirectUrl.Replace ( "#", "#".UrlEncode () );&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;response = await httpClient.GetAsync ( redirectUrl );&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if ( response.StatusCode != HttpStatusCode.Redirect )&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; redirectCount++;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; using ( MemoryStream memoryStream = new MemoryStream () )&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using ( Stream stream = await response.Content.ReadAsStreamAsync () )&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stream.CopyTo ( memoryStream );&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; memoryStream.Seek ( 0, SeekOrigin.Begin );&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytes = memoryStream.ToArray ();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; return bytes;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;catch ( Exception ex )&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; // ...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;----------------------&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>Thu, 15 Jun 2023 09:43:18 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Problem-downloading-file-using-Dropbox-provided-URL/m-p/691896#M31009</guid>
      <dc:creator>HairyWombat</dc:creator>
      <dc:date>2023-06-15T09:43:18Z</dc:date>
    </item>
  </channel>
</rss>

