<?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 VBA Request: HTTP status code 400 in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/VBA-Request-HTTP-status-code-400/m-p/481315#M1664</link>
    <description>&lt;P&gt;I have one macro that I used to test access to &lt;A href="https://www.dropbox.com/" target="_blank" rel="noopener"&gt;https://www.dropbox.com/&lt;/A&gt; and it worked for three years. But, about December 15-16, it stopped: it always gives out a HTTP status code = 400!&lt;BR /&gt;It reacts normally to a dozen other services. I've been fighting for 5 days, friends helped, but... Can you share your ideas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Here is the function (&lt;/SPAN&gt;&lt;SPAN&gt;'the function checks for access to the URL $ resource (file or directory)
'returns the server response code (number), or 0 if the link is invalid
'(200 - resource available, 404 - not found, 403 - no access, etc.&lt;/SPAN&gt;&lt;SPAN&gt;):&lt;BR /&gt;&lt;BR /&gt;Public Function GetURLstatus(ByVal URL$) As Long&lt;BR /&gt;&lt;BR /&gt;On Error Resume Next: URL$ = Replace(URL$, "\", "/")&lt;BR /&gt;Set xmlhttp = CreateObject("Microsoft.XMLHTTP")&lt;BR /&gt;xmlhttp.Open "GET", URL, "False"&lt;BR /&gt;xmlhttp.setRequestHeader "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT"&lt;BR /&gt;xmlhttp.send&lt;BR /&gt;GetURLstatus = Val(xmlhttp.Status)&lt;BR /&gt;Set xmlhttp = Nothing&lt;BR /&gt;End Function&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;SPAN&gt;a fragment of a macro where this function is used:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;SPAN&gt;&lt;BR /&gt;URL$ = "https://dropbox.com/" '&lt;/SPAN&gt;&lt;SPAN&gt;directory link&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;If GetURLstatus(URL$) = 200 Then........&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;or:&lt;BR /&gt;&lt;/SPAN&gt;MsgBox GetURLstatus(URL$), vbInformation, URL$ &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Dec 2020 12:50:47 GMT</pubDate>
    <dc:creator>Igor Kaplanov</dc:creator>
    <dc:date>2020-12-22T12:50:47Z</dc:date>
    <item>
      <title>VBA Request: HTTP status code 400</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/VBA-Request-HTTP-status-code-400/m-p/481315#M1664</link>
      <description>&lt;P&gt;I have one macro that I used to test access to &lt;A href="https://www.dropbox.com/" target="_blank" rel="noopener"&gt;https://www.dropbox.com/&lt;/A&gt; and it worked for three years. But, about December 15-16, it stopped: it always gives out a HTTP status code = 400!&lt;BR /&gt;It reacts normally to a dozen other services. I've been fighting for 5 days, friends helped, but... Can you share your ideas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Here is the function (&lt;/SPAN&gt;&lt;SPAN&gt;'the function checks for access to the URL $ resource (file or directory)
'returns the server response code (number), or 0 if the link is invalid
'(200 - resource available, 404 - not found, 403 - no access, etc.&lt;/SPAN&gt;&lt;SPAN&gt;):&lt;BR /&gt;&lt;BR /&gt;Public Function GetURLstatus(ByVal URL$) As Long&lt;BR /&gt;&lt;BR /&gt;On Error Resume Next: URL$ = Replace(URL$, "\", "/")&lt;BR /&gt;Set xmlhttp = CreateObject("Microsoft.XMLHTTP")&lt;BR /&gt;xmlhttp.Open "GET", URL, "False"&lt;BR /&gt;xmlhttp.setRequestHeader "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT"&lt;BR /&gt;xmlhttp.send&lt;BR /&gt;GetURLstatus = Val(xmlhttp.Status)&lt;BR /&gt;Set xmlhttp = Nothing&lt;BR /&gt;End Function&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;SPAN&gt;a fragment of a macro where this function is used:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;SPAN&gt;&lt;BR /&gt;URL$ = "https://dropbox.com/" '&lt;/SPAN&gt;&lt;SPAN&gt;directory link&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;If GetURLstatus(URL$) = 200 Then........&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;or:&lt;BR /&gt;&lt;/SPAN&gt;MsgBox GetURLstatus(URL$), vbInformation, URL$ &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 12:50:47 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/VBA-Request-HTTP-status-code-400/m-p/481315#M1664</guid>
      <dc:creator>Igor Kaplanov</dc:creator>
      <dc:date>2020-12-22T12:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: VBA Request: HTTP status code 400</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/VBA-Request-HTTP-status-code-400/m-p/481348#M1665</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1391075"&gt;@Igor Kaplanov&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Are you sure for the validity of link(s) in use? 🧐 What's going on when you try the same link(s) in a browser' incognito window? &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@9AD39CA637682E9616FBE31CDAF1B6C4/emoticons/1f914.png" alt=":thinking_face:" title=":thinking_face:" /&gt;&lt;/P&gt;&lt;P&gt;Hope this gives some direction.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 14:51:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/VBA-Request-HTTP-status-code-400/m-p/481348#M1665</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2020-12-22T14:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: VBA Request: HTTP status code 400</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/VBA-Request-HTTP-status-code-400/m-p/481375#M1667</link>
      <description>&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;Yes I am sure. The link works. &lt;A href="https://www.dropbox.com/" target="_blank"&gt;https://www.dropbox.com/&lt;/A&gt; loads the dropbox page in any mode.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 16:10:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/VBA-Request-HTTP-status-code-400/m-p/481375#M1667</guid>
      <dc:creator>Igor Kaplanov</dc:creator>
      <dc:date>2020-12-22T16:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: VBA Request: HTTP status code 400</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/VBA-Request-HTTP-status-code-400/m-p/481376#M1668</link>
      <description>&lt;P&gt;I&amp;nbsp;recommend checking the body of the error response. It may contain a more useful error message or error page.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For instance, the&amp;nbsp;Dropbox web site recently dropped support for Internet Explorer 11, so if your HTTP&amp;nbsp;client is setting a User-Agent that appears to be Internet Explorer 11, the&amp;nbsp;Dropbox web site will now return an error page indicating that it is no longer supported.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In that case, you could fix this by updating your code to not set a User-Agent string that appears to be Internet Explorer. (I can't provide support for VBA or&amp;nbsp;Microsoft.XMLHTTP, but you might be able to set the "User-Agent" header via the "xmlhttp.setRequestHeader" method, like you're using to set your "If-Modified-Since" header.)&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 16:12:22 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/VBA-Request-HTTP-status-code-400/m-p/481376#M1668</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-12-22T16:12:22Z</dc:date>
    </item>
  </channel>
</rss>

