Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi. I'm using webhooks to monitor files/folders changes.
For personal accounts all is good, I manage to do it, but I do have issues with Team accounts.
First of all, I do have console app which is for using the Business API and do have member file access permission.
On login I do save teamId, teamAdminId and the token locally. Also I do keep the cursor locally, and geting it using Team.AsAdmin("{teamAdminId }").ListFolderGetLatestCursorAsync() on first login/authorization with the console app.
On webhook event, I do receive it in this format:
{ "list_folder": { "teams": { "dbtid:xxxx": [ "dbmid:xxxx", "dbmid:xxxx", "dbmid:xxxx" ] } }, "delta": { "teams": { "dbtid:xxxx": [ "dbmid:xxxx", "dbmid:xxxx", "dbmid:xxxx" ] } } }
Based on the change for specific teamId, I do try to use the implementation of .NET SDK
using (DropboxTeamClient teamClient = new DropboxTeamClient(accessToken)) { var folderResult = await teamClient.AsAdmin(adminId).Files.ListFolderContinueAsync(cursor); }
I do always get empty Entries under folderResult response , after each webhook.
First, is it possible to read file changes for Team folders?
Can you please help me and let me know what I'm doing wrong?
Thanks!
It sounds like the cursor you're using is probably for the member's "member folder", but not the "team space". (And so, if the changes happen to just be in the team space, you wouldn't see them by listing the member folder.)
The Dropbox API does offer the ability to access and list the contents and changes in the team space, but you'll need to configure your calls specifically to do so. You can find information on how to do so in the Namespace Guide.
In the .NET SDK, you can set the Dropbox-API-Path-Root header discussed in that guide by using the DropboxClient.WithPathRoot method. E.g., you can use that when first calling ListFolderGetLatestCursorAsync to get a cursor for the team space instead of the member folder.
Hi there!
If you need more help you can view your support options (expected response time for a 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!