We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
andreavillares
3 years agoExplorer | Level 3
Dropbox Webhooks to get group changes notifications
I'm using the Dropbox Business API. I've been successful at experimenting for a while with webhooks for file changes and having an understanding of the documents getting uploaded/deleted from Dropbox...
andreavillares
3 years agoExplorer | Level 3
Regarding the previous API endpoints, I was trying to work my way around it by doing the following using python.
from dropbox import DropboxTeam
dbx_team_client = DropboxTeam(
oauth2_refresh_token=config.dropbox_creds['TOKEN'],
app_key=config.dropbox_creds['APP_KEY'],
app_secret=config.dropbox_creds['SECRET_KEY']
)
user_id = 'dbmid:xxxx'
dbx_user_client = dbx_team_client.as_user(team_member_id=user_id)
user_folders =dbx_user_client.sharing_list_folders()
This is all in a Dropbox Business account, that's why I need to assume the user so I can call the API endpoint "/list_folder" to understand which folders the user has got access to.
And it returns the following
ListFoldersResult(cursor=NOT_SET, entries=[SharedFolderMetadata(...)])
I don't understand why it doesn't return a cursor (as specified in documentation). I was hoping to save the cursor for each user and call "/list_folder/continue" to look for changes to the list of folders each user can access.
Is there anything I'm missing here?
Greg-DB
Dropbox Community Moderator
3 years agoFor /2/sharing/list_folders[/continue], the 'cursor' in the response is an optional value and is only returned "if there are additional shared folders that have not been returned yet", so it will not be set if there are no more entries to return.
Unfortunately, it's not suitable for monitoring for such changes over time like you're looking for, but I'll pass this along as a feature request for support for that. I can't promise if or when that might be implemented though.
By the way, in my own testing of the bug on the /2/team/groups/list/continue and /2/team/groups/members/list/continue endpoints, I'm finding that it seems to be possible to work around the issue by setting the initial 'limit' parameter to a value lower than the number of entries to return. I can't guarantee that will currently or always work for you, but I'm mentioning it in case it's helpful in the meantime.
About Dropbox API Support & Feedback
Find help with the Dropbox API from 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!