cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

files/get_metadata returns path not found

files/get_metadata returns path not found

Jamie-Everlaw
Explorer | Level 3
Go to solution

All get_metadata calls are returning a path not found error for anything (files or folders) from a business account, but works fine with anything inside the personal folder. I can access the folders and files as well as download them fine from web console.

Additionally, we tried sharing a folder with a user outside the organization and the get_metadata call is successful when accessing that folder using their credentials, but when we added that user to the team, get_metadata went back to failing even though the folder is still explicitly shared with them.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

Can you share the relevant code and output so we can take a look and advise? (Feel free to share privately by opening an API ticket if you'd prefer.) Be sure to redact the access token though.

Based on your description however, it sounds like you might be running in to an issue because you're not specifying the right "root" in the team for that item. The structure of Business teams is a little more complicated than that of individual accounts. I recommend reviewing the Namespace Guide for more information.

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff
Go to solution

Can you share the relevant code and output so we can take a look and advise? (Feel free to share privately by opening an API ticket if you'd prefer.) Be sure to redact the access token though.

Based on your description however, it sounds like you might be running in to an issue because you're not specifying the right "root" in the team for that item. The structure of Business teams is a little more complicated than that of individual accounts. I recommend reviewing the Namespace Guide for more information.

Jamie-Everlaw
Explorer | Level 3
Go to solution

Hi Greg,

Thanks for the response! I'll go ahead and open a ticket. From reading through the namespace guide, I don't think that's part of the issue since we're referencing items by id (id: XXXXXXX ), but I could be wrong there.

Jamie-Everlaw
Explorer | Level 3
Go to solution

To provide a little more information from the ticket, specifying a namespace is still necessary even when referencing files by ID.

The namespace isn't available from the file choose response (where I was getting the file ID), but can be adjusted at the client level by getting the namespaces associated with the user in the Java SDK like so

DbxClientV2 client = new DbxClientV2(requestConfig, token);
client = client.withPathRoot(PathRoot.root(client.users().getCurrentAccount().getRootInfo().getRootNamespaceId()));

The root namespace seems like it always works no matter if the file or user is part of a team, so I've opted to always use the root over the default home.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Jamie-Everlaw Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?