You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
gm72
3 years agoExplorer | Level 3
Get last login information
We have been trying to get the last login information for all of our students by using the get_events endpoint and are not having success retrieving the information on the post back.
Is there a...
Greg-DB
Dropbox Staff
Can you elaborate on what you mean when you say you "are not having success retrieving the information on the post back"? Are you getting some error or unexpected output that you can share?
You should be able to use the /2/team_log/get_events[/continue] endpoints to list events for your team. For logins in particular, you can set the "category" parameter to "logins".
I recommend using the API v2 Explorer to prototype and test calls like this, as it makes it easy to configure and try out calls.
gm72
3 years agoExplorer | Level 3
Thank you for your reply. I was unaware of the Dropbox API Explorer but that will be a great help going forward in conjunction with Postman.
I have found, however, that what we are actually looking for is a list of end-users who have NEVER logged in. This API request seems to retrieve either failed or successful logins.
Can you point me in a direction or specific API request which will return those results if possible?
Thanks again. George
- Здравко3 years agoLegendary | Level 20
gm72 wrote:...
I have found, however, that what we are actually looking for is a list of end-users who have NEVER logged in. This API request seems to retrieve either failed or successful logins.
...
Hi gm72,
Yes, of course. All logs keep information about events (e.g. event type, moment, other related information too). On such places usually you can't find information for something never came up on the world.
Such type of information you have to derive from different types of available information. As you already know, all active users can be find out, as Greg-DB has point you to. You can find all you users registered on your system as enumerate them. Use 2/team/members/list[continue] for this. Once you know the set of all users on one side and the set of active users (with logging activity) on other side, you can achieve set of users never logged in as a subset of all users when removed the active users set. That's it - simple enough. 😉
Hope this helps.
- Greg-DB3 years agoDropbox Staff
gm72 As Здравко outlined, you can compare the list of members against the login events to see which members haven't logged in. The API doesn't offer a more direct way of listing members that have never logged in than that, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
- gm723 years agoExplorer | Level 3
Thanks. That makes sense. The only issue is that the login events page is very extensive and requires many follow up requests with the cursor included. I'm having to manually combine the received JSON data so that I can compare file to file. I'll keep looking into it to see if I can find a better way, perhaps by using a date range to limit data. I'm assuming the get_events logs each and every request.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,915 PostsLatest Activity: 7 hours agoIf 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 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!