cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

When trying to list folder contents, error happens

When trying to list folder contents, error happens

MBUST
Explorer | Level 3
Go to solution

Hello,

 

New to Dropbox API. 

 

I can create folders and files, but when I try to list the contents of a folder, I get an error message. I'm particularly interested in getting the contents of the root folder, but for now, I'm just trying to test it with a specific folder I have.  I'm using https://api.dropboxapi.com/2/files/list_folder, and trying to copy the documentation example exactly, like so:

--header "Authorization: Basic XXXX"

--header "Content-Type: application/json"

--data "{\"include_deleted\":false,\"include_has_explicit_shared_members\":false,\"include_media_info\":false,\"include_mounted_folders\":true,\"include_non_downloadable_files\":true,\"path\":\"/FolderTest\",\"recursive\":false}"

 

But I get this error, and I don't see the mistake I'm making:

{
"error" : 
{
".tag" : "path",
"path" : 
{
".tag" : "unsupported_content_type"
}
},
"error_summary" : "path/unsupported_content_type/.."
}
 
Any ideas? Thanks.
12 Replies 12

rohitkmk
Explorer | Level 4

Hi Здравко/Greg, I am using a 3rd Party connector which internally uses these APIs, i cannot add Dropbox-API-Path-Root in the connector calls, if I use an App created by Administrator to call the List Folder API, will the API list all the folders in response?

Здравко
Legendary | Level 20

@rohitkmk wrote:

..., if I use an App created by Administrator to call the List Folder API, will the API list all the folders in response?


It doesn't matter who's the owner/creator of the application. What/how the application can access depends on how application authenticates (i.e. on behalves of who is authenticated) and how the calls are performed (i.e. everything that Greg and me already said above). In short - No.

 


@rohitkmk wrote:

..., I am using a 3rd Party connector which internally uses these APIs, i cannot add Dropbox-API-Path-Root in the connector calls, ...


Hm... Inform the creators of this connector for mentioned imperfection/bug. In fact this restricts you to access everything outside user private folder on Business account with spaces configuration (in spite you still could be able access old configurations, where no change of the root is need). The connector has to get updated definitely!

Hope this clarifies matter.

Greg-DB
Dropbox Staff

@rohitkmk Здравко is correct; to access the team space you'd need to set the 'Dropbox-API-Path-Root' header. (It doesn't matter who owns/creates the app.) You can find more information in the Team Files Guide.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Здравко Legendary | Level 20
  • User avatar
    rohitkmk Explorer | Level 4
What do Dropbox user levels mean?