cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Business API notifications for activity

Business API notifications for activity

Federico B.4
New member | Level 1

Hello. I'm trying to get a notification when a team's user logs in, but so far I haven't found a reasonable way to do this.

Since logins don't seem to trigger the webhooks, what I'm doing is:

1. Wait for any webhook notification (the user did something so he must have logged in recently).

2. Once received, take the list of users and get the events from the `team/log/get_events` v1 API (I was not able to find login/logout information in v2). Save cursor for future requests. 

It kinda works, but I'd like to know if there's a more appropriate way to achieve this for auditing purposes.

3 Replies 3

Alexandra F.1
New member | Level 1

Yes, the /team/log/get_events (aka the audit log) for API v1 is what you want. Unfortunately, the API does not support webhooks for login events, but I'll be sure to pass this along as a feature request.

Also, you may find API v2's /devices/list_members_devices endpoint useful (documentation here: https://www.dropbox.com/developers/documentation/http/teams#team-devices-list_members_devices ). You can get a list of all the devices and web sessions to which all team members are currently signed-in (sorted by member). It's not real-time notifications, but you could use this in a similar way to how your webhook+audit log workflow, replacing /devices/ calls with the audit log.

Federico B.4
New member | Level 1

Thanks for the prompt response Alexandra! We'll use `list_members_devices` since the format fits our situation much better.

To clarify our needs going forward for the feature request: we want to receive a webhook when a user does a login/logout action for auditing processes on business accounts. 

Thanks again!

Alexandra F.1
New member | Level 1

Thanks, I'll make sure to add that to the feature request.

Need more support?