<?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: Error Listing Contents of a folder in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-Listing-Contents-of-a-folder/m-p/265076#M15546</link>
    <description>I fixed it by permission type 'Full Dropbox' and now it's giving all files info in dropbox root folder . Thanks man</description>
    <pubDate>Thu, 15 Feb 2018 07:24:52 GMT</pubDate>
    <dc:creator>dungun</dc:creator>
    <dc:date>2018-02-15T07:24:52Z</dc:date>
    <item>
      <title>Error Listing Contents of a folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-Listing-Contents-of-a-folder/m-p/265006#M15528</link>
      <description>&lt;P&gt;Hi , I am making an api call to&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&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; to list the contents of a folder named "images" .&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;here is my code&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$res &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; $client&lt;/SPAN&gt;&lt;SPAN&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;request(&lt;/SPAN&gt;&lt;SPAN&gt;'POST'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&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;SPAN&gt;, [&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'headers'&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Authorization'&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt; &lt;SPAN&gt;'Bearer '&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;$access_token,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Content-Type"&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt; &lt;SPAN&gt;"application/json"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'json'&lt;/SPAN&gt; &lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt; [&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"path"&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;"/images"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"recursive"&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt; &lt;SPAN&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"include_media_info"&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt; &lt;SPAN&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"include_deleted"&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt; &lt;SPAN&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"include_has_explicit_shared_members"&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt; &lt;SPAN&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"include_mounted_folders"&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt; &lt;SPAN&gt;true&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;]);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I've tried giving and removing forward slash in path like "/images"&amp;nbsp; which gives me path not found error and other "images" which gives me " did not match pattern '(/(.|[\r\n])*)?&amp;nbsp; " error . What's wrong in my code ?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 May 2019 09:15:22 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-Listing-Contents-of-a-folder/m-p/265006#M15528</guid>
      <dc:creator>dungun</dc:creator>
      <dc:date>2019-05-29T09:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Error Listing Contents of a folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-Listing-Contents-of-a-folder/m-p/265017#M15530</link>
      <description>The leading slash is required when identifying non-root paths, so "/images" would be the correct format.&lt;BR /&gt;&lt;BR /&gt;The not_found error indicates that there is nothing at the specified path in the connected account. That being the case, make sure that:&lt;BR /&gt;- you're using an access token for the account you mean to interact with.&lt;BR /&gt;- you're using the right path and that there is something at that path in that account. (You can use dropbox.com to check.)&lt;BR /&gt;- if you're using an app with the "app folder" permission, that the path exists inside the special app folder for the app in the connected account. (Apps with the "app folder" permission only have access to the app folder automatically created for them, so paths are automatically interpreted relative to that app folder. For example, "/images" would actually point to /Apps/&amp;lt;app folder name&amp;gt;/images" by default.)</description>
      <pubDate>Wed, 14 Feb 2018 20:42:38 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-Listing-Contents-of-a-folder/m-p/265017#M15530</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-02-14T20:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error Listing Contents of a folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-Listing-Contents-of-a-folder/m-p/265070#M15543</link>
      <description>&lt;P&gt;Here is How root folder looks like&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dropbox1.png" style="width: 871px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/2391i1ECF87449374EEF4/image-dimensions/871x391?v=v2" width="871" height="391" role="button" title="dropbox1.png" alt="dropbox1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and images folder looks like this&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="dropbox2.png" style="width: 999px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/2393i0A370258B01C1E4D/image-size/large?v=v2&amp;amp;px=999" role="button" title="dropbox2.png" alt="dropbox2.png" /&gt;&lt;/span&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and here is my php&amp;nbsp; code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;?php

require 'curl/autoload.php';
use GuzzleHttp\Client;

if(isset($_GET['code'])) {
$auth_code = $_GET['code'];
$client = new \GuzzleHttp\Client();
$res = $client-&amp;gt;request('POST', 'https://api.dropboxapi.com/oauth2/token', [
    'form_params' =&amp;gt; [
        'code' =&amp;gt; $auth_code,
        'grant_type' =&amp;gt; 'authorization_code',
        'client_id'=&amp;gt;'0r9hh54ybs8xxxx',
        'client_secret'=&amp;gt;'5i3rlsio4zvxxxx',
        'redirect_uri'=&amp;gt;'http://localhost/dbru/db_auth.php'
    ]
]);

$cont = $res-&amp;gt;getBody()-&amp;gt;getContents();
$access_token=json_decode($cont,true);
$access_token = $access_token['access_token'];
$res = $client-&amp;gt;request('POST', 'https://api.dropboxapi.com/2/files/list_folder', [
    'headers'=&amp;gt;[
        'Authorization'=&amp;gt; 'Bearer '.$access_token,
        "Content-Type"=&amp;gt; "application/json"
    ],
    'json' =&amp;gt; [
        "path"=&amp;gt;"/images",
        "recursive"=&amp;gt; false,
        "include_media_info"=&amp;gt; false,
        "include_deleted"=&amp;gt; false,
        "include_has_explicit_shared_members"=&amp;gt; false,
        "include_mounted_folders"=&amp;gt; true
        ]
]);

$cont = $res-&amp;gt;getBody()-&amp;gt;getContents();
echo '&amp;lt;pre&amp;gt;',print_r($cont);

}

?&amp;gt;&lt;/PRE&gt;&lt;P&gt;and it's giving me following error&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;POST &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;` resulted in a `409 Conflict` response: {"error_summary": "path/not_found/..", "error": {".tag": "path", "path": {".tag": "not_found"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 05:20:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-Listing-Contents-of-a-folder/m-p/265070#M15543</guid>
      <dc:creator>dungun</dc:creator>
      <dc:date>2018-02-15T05:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Error Listing Contents of a folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-Listing-Contents-of-a-folder/m-p/265073#M15544</link>
      <description>ok... i got this . I created a folder named images under Apps/&amp;lt;my App name&amp;gt;/images and it's giving me result . But I want to know how can I access root folder files of my users or it's not possible ?</description>
      <pubDate>Thu, 15 Feb 2018 05:39:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-Listing-Contents-of-a-folder/m-p/265073#M15544</guid>
      <dc:creator>dungun</dc:creator>
      <dc:date>2018-02-15T05:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error Listing Contents of a folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-Listing-Contents-of-a-folder/m-p/265074#M15545</link>
      <description>If I want to access the folder "images" in my root folder by giving the path as 'images' or 'images/' , it gives me the following pattern matching error&lt;BR /&gt;&lt;BR /&gt;POST &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;` resulted in a `400 Bad Request` response: Error in call to API function "files/list_folder": request body: path: 'images/' did not match pattern '(/(.|[\r\n])*)?|&lt;BR /&gt;&lt;BR /&gt;I just want to list the content of my 'images' folder which is in root folder and not in Apps/&amp;lt;App name &amp;gt;/images</description>
      <pubDate>Thu, 15 Feb 2018 06:06:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-Listing-Contents-of-a-folder/m-p/265074#M15545</guid>
      <dc:creator>dungun</dc:creator>
      <dc:date>2018-02-15T06:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Error Listing Contents of a folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-Listing-Contents-of-a-folder/m-p/265076#M15546</link>
      <description>I fixed it by permission type 'Full Dropbox' and now it's giving all files info in dropbox root folder . Thanks man</description>
      <pubDate>Thu, 15 Feb 2018 07:24:52 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-Listing-Contents-of-a-folder/m-p/265076#M15546</guid>
      <dc:creator>dungun</dc:creator>
      <dc:date>2018-02-15T07:24:52Z</dc:date>
    </item>
  </channel>
</rss>

