The Community is undergoing a major upgrade. Find out more, ask us questions or share your thoughts here.
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 specific value we need to send in the request body in order to retrieve this information? Our goal is to target specific users for deletion if they have not logged in for some time.
Thanks in advance.
- Greg-DBDropbox 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.
- gm72Explorer | 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
- ЗдравкоLegendary | 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.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,875 PostsLatest Activity: 2 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!