Way to get timestamp of last activity for all Slack users

最后都变了- 提交于 2019-12-07 13:40:06

问题


I am building a Python script which retrieves a set of information for all Slack users of the organization that I work. Currently, I was asked by the stakeholders to retrieve the last time that our organization's users were active on Slack. I came across the users.getPresence method but this can only return a timestamp for the owner of the token. Has anybody worked on that before? Thanks.


回答1:


It depends a bit how you define "active on Slack".

If getting the date and time a user was logged in last is enough, take a look at team.accessLogs, which will give you the timestamp of the last login for every user (date_last).

This will not reflect whether the user performed any activity, e.g. posting a message or uploading a file though.

However, note that this API method works for paid plans only.



来源:https://stackoverflow.com/questions/50280153/way-to-get-timestamp-of-last-activity-for-all-slack-users

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!