Take Your Search Game to the Next Level with Dropbox Dash  🚀✨ Curious how it works? Ask us here! 

Forum Discussion

Jamie-Everlaw's avatar
Jamie-Everlaw
Explorer | Level 3
6 years ago
Solved

files/get_metadata returns path not found

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.

  • 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.

3 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    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's avatar
      Jamie-Everlaw
      Explorer | Level 3

      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's avatar
        Jamie-Everlaw
        Explorer | Level 3

        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.