cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you interested in hearing how one of our Community members uses Dropbox for sailing trips? Read all about it 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: 

Dropbox API suddenly malfunctionning

Dropbox API suddenly malfunctionning

yanjobin
Explorer | Level 3

Hello,

We have been using the Dropbox api in our application for a couple years now and it has always worked flawlesly.

 

Since about last week, the list_folder endpoint is no longer returning all the files and folders in a any given sub folder.

For example, list_folder is only returning 4 entries with has_more set to false, but there are actually 78 files and folders in the directory specified.

This has always worked before, nothing changed on our side.

 

We have not migrated to the short-lived access tokens yet. However, I don't think this is the issue because the API calls do work, just not as intended.

 

Thank you

6 Replies 6

Greg-DB
Dropbox Staff

Its sounds like your team recently switched to the "team space" configuration. By default, API calls operate in the "member folder" of the connected account, not the "team space", so you wouldn't see anything in the team space when using the API by default. You can configure API calls to operate in the "team space" instead though. To do so, you'll need to set the "Dropbox-Api-Path-Root" header. You can find information on this in the Team Files Guide.

 

yanjobin
Explorer | Level 3

Configuring the api to operate in the team space using the "Dropbox-Api-Path-Root" header fixed the problem.

 

Thank you

Jay P
New member | Level 2

Greg...I connect to the DB API via Claris Connect. 

I am experiencing the same problems as outlined in this post. 

Do you have any information on how to update the "Dropbox-API-Path-Root Header" in Claris Connect?

Greg-DB
Dropbox Staff

@Jay P I can't offer support for Claris Connect itself, so I recommend referring to the documentation or support resources for Claris Connect. If Claris Connect doesn't already offer the ability to set the "Dropbox-API-Path-Root" header (or arbitrary headers such that you can specify "Dropbox-API-Path-Root"), the developer of Claris Connect will need to update it to support that.

Jay P
New member | Level 2

Greg,

Thank you very much for your quick response. I am reaching out to Clairs about this now. However, I was hoping to elaborate a bit more to ensure the fix is with Claris. 

 

I connect to the DB API (via Claris Connect)  to automate a Folder creation and create a Share (on the newly created Folder). It has worked perfectly for years…until the new DB update. “Team Spaces?”

 

Using my current code, the folder gets created in the correct directory, but when I reference the newly created folder’s path (to create a Share) I get the “invalid_root/” error returned. 

 

This is what I send to create the folder…(and it works)

 

"--request POST --header \"Content-Type: application/json\" --data @$$JSONdata"

--------------------$$JSONdata Below--------------------------

JSONSetElement ( "{}" ;

["action" ; "script" ; JSONString] ;

["Path" ; $DBPath; JSONString] ;

["Folder Name" ; $JobFolder; JSONString] 

)

 

However, I get this result when requesting the Share from the folder’s path:

"body":{2 items

"error_summary":string"invalid_root/."

"error":{2 items

".tag":string"invalid_root"

"invalid_root":{4 items

".tag":string"team"

"root_namespace_id":string"2986277024"

"home_namespace_id":string"152637445"

"home_path":string"/Jay Pif"

 

Do you think this is a Claris Connect issue?

Greg-DB
Dropbox Staff

@Jay P Since you are getting the "invalid_root" error, it seems you are already able to set the "Dropbox-API-Path-Root" header, but aren't supplying the correct value. Please refer to the Team Files Guide for information on how to retrieve the relevant value(s).

 

If that's still not working for you, please share the steps and code to reproduce the issue so we can take a look.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Jay P New member | Level 2
  • User avatar
    yanjobin Explorer | Level 3
What do Dropbox user levels mean?