Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

pAir's avatar
pAir
New member | Level 2
2 months ago

Team Folder Webhook Not Detecting File Uploads in Specific Subfolder


Hi everyone,

  I'm having trouble with Dropbox Business API webhooks not detecting file uploads in a specific team folder subfolder, even though the user has access via the web interface.

My Requirement:
  I want the webhook to trigger when:
  - Any user uploads a file with a specific extension (e.g., .png) 
  - Into a specific team folder subfolder (e.g., /Team Folder/Upload Directory/)
  - Then my webhook should take the file and upload it to S3 for further processing

  Setup:
  - Using Dropbox Business API with team access token
  - Webhook configured and triggers on file upload
  - User can view/edit the target folder in Dropbox web UI
  - Using Dropbox-API-Select-User and Dropbox-API-Path-Root headers

  Problem:
  When listing folders via API (/files/list_folder), I can see:
  - /Team Folder/Clients - Subscribers/ ✅ (hundreds of files/folders)
  - But NOT /Team Folder/test/Upload Directory/ ❌ (completely missing)

  The user can access both folders in the web interface, but the API only shows one of them.

  Current API calls:
  // Get user's root namespace
  const rootNamespaceId = await getUserRootNamespace(userId);

  // List folders with proper headers
  fetch('https://api.dropboxapi.com/2/files/list_folder', {
      headers: {
          'Authorization': `Bearer ${TEAM_ACCESS_TOKEN}`,
          'Dropbox-API-Select-User': userId,
          'Dropbox-API-Path-Root': JSON.stringify({".tag": "namespace_id", "namespace_id": rootNamespaceId}),
      },
      body: JSON.stringify({ path: '', recursive: true })
  });

  Questions:
  1. Why would some team folders be visible via API while others aren't, even when the user has web access to both?
  2. Are there different permission scopes needed for different team folder types?
  3. Should I be using a different namespace ID or path-root configuration?
  4. Could this be related to how the team folders were originally created or shared?

 Any insights would be greatly appreciated! Thanks in advance.

3 Replies

  • DB-Des's avatar
    DB-Des
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    2 months ago

    Hi pAir​ 

    Please note that any changes in shared folders, even made by other users, should trigger webhook notifications for your linked app, as long as the shared folder is in a connected account and available to your app, per the app's permission.

    As far as your second enquiry, what happens when you provide the specific path "/Team Folder/test/Upload Directory/" as the value to the 'path' parameter, are you getting an error?

  • pAir's avatar
    pAir
    New member | Level 2
    2 months ago

    no error, but what’s the purpose of that path? If I provide my target folder path, will it only trigger the webhook when a file is uploaded to it? The biggest challenge I’m currently facing is that it’s scanning files from all users account. However, I only want the webhook to run and scan a new file upload(any users) from my target folder, which is /Team Folder/test/Upload Directory/.

    is that possible?

  • DB-Des's avatar
    DB-Des
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    2 months ago

    pAir​ 

    It’s not currently possible to limit webhook notifications to a specific folder.

    As outlined in our Webhooks documentation, once you register a URI to receive webhooks, Dropbox sends an HTTP request to that endpoint whenever there’s a change in any of the accounts connected to your app — not just a specific path or folder.

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API
Make connections with other developers

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

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, Facebook or Instagram.

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!