<?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 Using API to get list folder in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-API-to-get-list-folder/m-p/457318#M23568</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to use Matlab to get the contents of a folder, my code is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;     % Generate the custom header&lt;BR /&gt;headerFields = {'Authorization', ['Bearer ', dropboxAccessToken]};&lt;BR /&gt;headerFields{2,1} = 'Content-Type';&lt;BR /&gt;headerFields{2,2} = 'application/json';&lt;BR /&gt;headerFields = string(headerFields);&lt;BR /&gt;&lt;BR /&gt;% Set the options for WEBWRITE&lt;BR /&gt;opt = weboptions;&lt;BR /&gt;opt.MediaType = 'application/json';&lt;BR /&gt;opt.CharacterEncoding = 'ISO-8859-1';&lt;BR /&gt;opt.RequestMethod = 'post'; &lt;BR /&gt;opt.KeyName='data';&lt;BR /&gt;opt.KeyValue='{"path": "" , "recursive":true}'; &lt;BR /&gt;opt.HeaderFields = headerFields;&lt;BR /&gt;&lt;BR /&gt;%Get data&lt;BR /&gt;rawData = webread('https://api.dropboxapi.com/2/files/list_folder',opt');&lt;/PRE&gt;
&lt;P&gt;but I am getting "The server returned the status 400 with message "Bad Request" in response to the request".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What am I doing wrong?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 18:20:18 GMT</pubDate>
    <dc:creator>IsaacMarin</dc:creator>
    <dc:date>2020-09-29T18:20:18Z</dc:date>
    <item>
      <title>Using API to get list folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-API-to-get-list-folder/m-p/457318#M23568</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to use Matlab to get the contents of a folder, my code is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;     % Generate the custom header&lt;BR /&gt;headerFields = {'Authorization', ['Bearer ', dropboxAccessToken]};&lt;BR /&gt;headerFields{2,1} = 'Content-Type';&lt;BR /&gt;headerFields{2,2} = 'application/json';&lt;BR /&gt;headerFields = string(headerFields);&lt;BR /&gt;&lt;BR /&gt;% Set the options for WEBWRITE&lt;BR /&gt;opt = weboptions;&lt;BR /&gt;opt.MediaType = 'application/json';&lt;BR /&gt;opt.CharacterEncoding = 'ISO-8859-1';&lt;BR /&gt;opt.RequestMethod = 'post'; &lt;BR /&gt;opt.KeyName='data';&lt;BR /&gt;opt.KeyValue='{"path": "" , "recursive":true}'; &lt;BR /&gt;opt.HeaderFields = headerFields;&lt;BR /&gt;&lt;BR /&gt;%Get data&lt;BR /&gt;rawData = webread('https://api.dropboxapi.com/2/files/list_folder',opt');&lt;/PRE&gt;
&lt;P&gt;but I am getting "The server returned the status 400 with message "Bad Request" in response to the request".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What am I doing wrong?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:20:18 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-API-to-get-list-folder/m-p/457318#M23568</guid>
      <dc:creator>IsaacMarin</dc:creator>
      <dc:date>2020-09-29T18:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using API to get list folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-API-to-get-list-folder/m-p/457340#M23569</link>
      <description>&lt;P&gt;Can you also print out the response body? It should contain a more useful error message.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:47:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-API-to-get-list-folder/m-p/457340#M23569</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-09-29T16:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using API to get list folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-API-to-get-list-folder/m-p/457356#M23573</link>
      <description>&lt;P&gt;Nevermind, I decided to use this code and worked&amp;nbsp;&lt;A href="https://www.mathworks.com/matlabcentral/fileexchange/35693-urlread2" target="_blank"&gt;https://www.mathworks.com/matlabcentral/fileexchange/35693-urlread2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:17:54 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-API-to-get-list-folder/m-p/457356#M23573</guid>
      <dc:creator>IsaacMarin</dc:creator>
      <dc:date>2020-09-29T17:17:54Z</dc:date>
    </item>
  </channel>
</rss>

