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.