We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

expertbet's avatar
expertbet
New member | Level 2
2 years ago

API "List Folder" , no team folder

The Api-Call "list-folder" only read und list my private folder, but not the team folder. All folders in the team folder are not displayed.


All permissions are set and i also tried the call with a "Dropbox-API-Select-Admin"-Header.


Without the "Admin-Header", no folder are listed because "the OAuth 2 access token you provided is for an entire Dropbox Business team". But with the "Admin-Header" there are only the private folder liested.


What could be my false?

Thomas

  • Hi peeps,

    By default, Dropbox API always access user folder as default namespace. For accounts that user folder give access to all data particular user has access to (i.e. personal accounts and business account with team folders configuration), it's ok - you don't need to do anything in addition - the default is fine. For accounts which user folders are subfolders in the account root (business account with team space configuration - as yours seems to be) team spaces are outside your member folder (note team spaces, not classical folders) and that's why the default configuration doesn't work for you. You still have the same access but the folders you're looking for are outside your member folder and that's why stay "invisible". Such folders to become visible (spaces actually), you have to change your API root to match to the account root, not to member's folder (for such accounts they are different things). Changing root can be done using "Dropbox-API-Path-Root" HTTP header. 😉 Take a look here for more info.

    Hope this helps.


  • expertbet wrote:

    ...
    Without the "Admin-Header", no folder are listed because "the OAuth 2 access token you provided is for an entire Dropbox Business team". But with the "Admin-Header" there are only the private folder liested.

    ...


    expertbet, In addition to all already said, you miss a fact that all file/folder access operations have to be performed on some user/member behalf! Otherwise error, like the one you got, is something normal. Yes, for all business accounts (regardless their configuration), tokens represent the team, not some user, and that's why you have to add either "Dropbox-API-Select-User" header or "Dropbox-API-Select-Admin" header with corresponding team_member_id (as you partially found out) to represent particular member. 😉

    Hope this sheds some more light.

  • Poui's avatar
    Poui
    Helpful | Level 5

    Same issue, if you look at the "list_folders" api, I am pretty sure you will find all the old teams folder if you have the header 

    include_deleted (optional)

    set to True, I can't even get my team members ID, the request give me a 500 error

    • Здравко's avatar
      Здравко
      Legendary | Level 20

      Hi peeps,

      By default, Dropbox API always access user folder as default namespace. For accounts that user folder give access to all data particular user has access to (i.e. personal accounts and business account with team folders configuration), it's ok - you don't need to do anything in addition - the default is fine. For accounts which user folders are subfolders in the account root (business account with team space configuration - as yours seems to be) team spaces are outside your member folder (note team spaces, not classical folders) and that's why the default configuration doesn't work for you. You still have the same access but the folders you're looking for are outside your member folder and that's why stay "invisible". Such folders to become visible (spaces actually), you have to change your API root to match to the account root, not to member's folder (for such accounts they are different things). Changing root can be done using "Dropbox-API-Path-Root" HTTP header. 😉 Take a look here for more info.

      Hope this helps.

      • Poui's avatar
        Poui
        Helpful | Level 5

        It worked for me, but some third party app like Make.com (New naming for Intergromat) doesn't allow me to add a header inside their module, is there a way to permanently change an account API-Path-Root like it was before the Saturday update ?