You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

dsoprea's avatar
dsoprea
Helpful | Level 6
12 months ago

Folders that are visible from the SDK don't appear to be visible via the CLI

We have a "Full Dropbox" app installed on a team account. We're setting DROPBOX_MANAGE_APP_KEY and DROPBOX_MANAGE_APP_SECRET. I've also tried with DROPBOX_PERSONAL_APP_KEY and DROPBOX_PERSONAL_APP_SE...
  • dsoprea's avatar
    dsoprea
    11 months ago

    Okay. Yes. That's what I was missing. I saw enough entries that has non-None team-member IDs that I missed that the one I was looking for had a None one.

     

    Yes. That's fine. I'm not dealing with pagination given that this is a PoC that didn't require it.

     

    Since this is a team-level folder, I've just enumerated the members and grabbed the first one:

    # Get team-scoped resource
    dbxt = dropbox.dropbox_client.DropboxTeam(
            app_key=_DROPBOX_KEY,
            app_secret=_DROPBOX_SECRET,
            oauth2_refresh_token=_DROPBOX_REFRESH_TOKEN)
    
    # Get members
    
    result = dbxt.team_members_list()
    
    # Grab the first member returned
    
    first_member_id = None
    for member in result.members:
        first_member_id = member.profile.team_member_id
        break
    
    assert \
        first_member_id is not None, \
        "No members found."
    
    # Get the namespace whose root we want to use
    
    r = dbxt.team_namespaces_list()
    namespace_id = None
    for namespace in r.namespaces:
        if namespace.name != 'ManagedIntake':
            continue
    
        namespace_id = namespace.namespace_id
    
    assert \
        namespace_id is not None, \
        "Could not find images namespace."
    
    # Get object scoped to the member and root-path above
    
    dbxtm = dbxt.as_user(first_member_id)
    
    path = dropbox.common.PathRoot.namespace_id(namespace_id)
    dbxtmp = dbxtm.with_path_root(path)
    
    result = dbxtmp.files_list_folder("")
    for entry in result.entries:
        print(entry.name)

     

    So, that works, and works as desired.

     

    How would the account-level access work? Since all of our apps would have to be team-scoped, are you just saying that removing the team-scopes will magically allow the app to have account -specific access? I had originally created a separate app for this and hadn't given it any team-scopes, but I was unable to even see this folder, presumably because it lives in the team space. Is that accurate?

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,884 PostsLatest Activity: 6 hours ago
326 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!