<?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: How to List all files in the Dropbox folder using Web Request? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-List-all-files-in-the-Dropbox-folder-using-Web-Request/m-p/270236#M15970</link>
    <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/647257"&gt;@saravananct143&lt;/a&gt;&amp;nbsp;looking at your code above it seems like you are not adding any content to the body of your POST request.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To do this&amp;nbsp;for HttpWebRequest you will need to encode the data, and then add some additional code to send that data after you make the call to GetRequestStream().&lt;BR /&gt;&lt;BR /&gt;There is a good example of this in Microsoft's HttpWebRequest documentation found here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/d4cek6cc.aspx#Examples" target="_blank"&gt;https://msdn.microsoft.com/en-us/library/d4cek6cc.aspx#Examples&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Note the creation and encoding of the postData variable into a byte array, and then, later on, the writing of that data to the request stream after the call to GetRequestStream().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For your Dropbox API request, the postData content will be the JSON formatted parameters specified in the documentation for /list_folder that&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;&amp;nbsp;referenced earlier in this thread.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Further, if you are using version 4.5 or newer&amp;nbsp;of .NET, I would suggest looking at HttpClient vs HttpWebRequest as it provides a much simpler implementation for sending HTTP requests:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://msdn.microsoft.com/library/system.net.http.httpclient(v=vs.118).aspx" target="_blank"&gt;https://msdn.microsoft.com/library/system.net.http.httpclient.aspx&lt;/A&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Chuck&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Mar 2018 18:57:31 GMT</pubDate>
    <dc:creator>chirstius</dc:creator>
    <dc:date>2018-03-27T18:57:31Z</dc:date>
    <item>
      <title>How to List all files in the Dropbox folder using Web Request?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-List-all-files-in-the-Dropbox-folder-using-Web-Request/m-p/270141#M15956</link>
      <description>&lt;P&gt;&lt;BR /&gt; string accessToken = "Token";&lt;BR /&gt; var request = (HttpWebRequest)WebRequest.Create("&lt;A href="https://api.dropboxapi.com/2/files/list_folder" target="_blank"&gt;https://api.dropboxapi.com/2/files/list_folder&lt;/A&gt;");&lt;/P&gt;
&lt;P&gt;request.Method = "Post";&lt;BR /&gt; request.Headers.Add("Authorization", "Bearer " + accessToken);&lt;BR /&gt; request.ContentType = "application/json";&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt; Stream newStream = request.GetRequestStream();&lt;BR /&gt; &lt;BR /&gt; var response = (HttpWebResponse)request.GetResponse();&lt;BR /&gt; newStream.Close();&lt;/P&gt;
&lt;P&gt;StreamReader sr = new StreamReader(response.GetResponseStream());&lt;BR /&gt; string responseString = sr.ReadToEnd();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm getting this error. How can i slove this ?&lt;/P&gt;
&lt;P&gt;The remote server returned an error: (400) Bad Request.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:14:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-List-all-files-in-the-Dropbox-folder-using-Web-Request/m-p/270141#M15956</guid>
      <dc:creator>saravananct143</dc:creator>
      <dc:date>2019-05-29T09:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to List all files in the Dropbox folder using Web Request?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-List-all-files-in-the-Dropbox-folder-using-Web-Request/m-p/270203#M15964</link>
      <description>Using the /2/files/list_folder endpoint is the right way to begin listing the contents of a folder.&lt;BR /&gt;&lt;BR /&gt;Please check the content of the response body. It should contain a more specific error message indicating what the issue is.</description>
      <pubDate>Tue, 27 Mar 2018 14:21:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-List-all-files-in-the-Dropbox-folder-using-Web-Request/m-p/270203#M15964</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-03-27T14:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to List all files in the Dropbox folder using Web Request?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-List-all-files-in-the-Dropbox-folder-using-Web-Request/m-p/270215#M15966</link>
      <description>&lt;P&gt;I'm trying this url in postman&lt;/P&gt;
&lt;P&gt;url:&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://api.dropboxapi.com/2/files/list_folder" target="_blank"&gt;https://api.dropboxapi.com/2/files/list_folder&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Header :&amp;nbsp;Authorization:Bearer Token&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This following error came . How can i solve this please help me&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error in call to API function "files/list_folder": This function requires its argument in the HTTP request body, but your request body is empty&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 15:32:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-List-all-files-in-the-Dropbox-folder-using-Web-Request/m-p/270215#M15966</guid>
      <dc:creator>saravananct143</dc:creator>
      <dc:date>2018-03-27T15:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to List all files in the Dropbox folder using Web Request?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-List-all-files-in-the-Dropbox-folder-using-Web-Request/m-p/270236#M15970</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/647257"&gt;@saravananct143&lt;/a&gt;&amp;nbsp;looking at your code above it seems like you are not adding any content to the body of your POST request.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To do this&amp;nbsp;for HttpWebRequest you will need to encode the data, and then add some additional code to send that data after you make the call to GetRequestStream().&lt;BR /&gt;&lt;BR /&gt;There is a good example of this in Microsoft's HttpWebRequest documentation found here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/d4cek6cc.aspx#Examples" target="_blank"&gt;https://msdn.microsoft.com/en-us/library/d4cek6cc.aspx#Examples&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Note the creation and encoding of the postData variable into a byte array, and then, later on, the writing of that data to the request stream after the call to GetRequestStream().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For your Dropbox API request, the postData content will be the JSON formatted parameters specified in the documentation for /list_folder that&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;&amp;nbsp;referenced earlier in this thread.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Further, if you are using version 4.5 or newer&amp;nbsp;of .NET, I would suggest looking at HttpClient vs HttpWebRequest as it provides a much simpler implementation for sending HTTP requests:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://msdn.microsoft.com/library/system.net.http.httpclient(v=vs.118).aspx" target="_blank"&gt;https://msdn.microsoft.com/library/system.net.http.httpclient.aspx&lt;/A&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Chuck&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 18:57:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-List-all-files-in-the-Dropbox-folder-using-Web-Request/m-p/270236#M15970</guid>
      <dc:creator>chirstius</dc:creator>
      <dc:date>2018-03-27T18:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to List all files in the Dropbox folder using Web Request?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-List-all-files-in-the-Dropbox-folder-using-Web-Request/m-p/270292#M15971</link>
      <description>Hi @Greak , please send any sample code for authendication token generation and retriving dropbox file.</description>
      <pubDate>Wed, 28 Mar 2018 02:37:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-List-all-files-in-the-Dropbox-folder-using-Web-Request/m-p/270292#M15971</guid>
      <dc:creator>saravananct143</dc:creator>
      <dc:date>2018-03-28T02:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to List all files in the Dropbox folder using Web Request?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-List-all-files-in-the-Dropbox-folder-using-Web-Request/m-p/270375#M15975</link>
      <description>We don't have official sample code for doing this in HttpWebRequest in particular. I recommend reviewing the resources Chuck shared above for help writing your code.</description>
      <pubDate>Wed, 28 Mar 2018 15:37:07 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-List-all-files-in-the-Dropbox-folder-using-Web-Request/m-p/270375#M15975</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-03-28T15:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to List all files in the Dropbox folder using Web Request?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-List-all-files-in-the-Dropbox-folder-using-Web-Request/m-p/270379#M15978</link>
      <description>&lt;P&gt;Without browser verification is it possible to create a authdication token?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 16:04:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-List-all-files-in-the-Dropbox-folder-using-Web-Request/m-p/270379#M15978</guid>
      <dc:creator>saravananct143</dc:creator>
      <dc:date>2018-03-28T16:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to List all files in the Dropbox folder using Web Request?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-List-all-files-in-the-Dropbox-folder-using-Web-Request/m-p/270380#M15979</link>
      <description>No, the user needs to explicitly authorize the app in the browser in order for the app to receive an access token. The app can then store and re-use the resulting access token for future API calls though, without further manual user action.</description>
      <pubDate>Wed, 28 Mar 2018 16:08:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-List-all-files-in-the-Dropbox-folder-using-Web-Request/m-p/270380#M15979</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-03-28T16:08:05Z</dc:date>
    </item>
  </channel>
</rss>

