A really simple script to obtain all available access logs from your Slack workspace and to find the last login time for each user.
- This script uses legacy tokens - more info here
- Do not share your token!
- API limitations (more info):
- 1000 logs per page
- 100 pages
- 20 requests per minute
- Python >= 3.6
- requests, tqdm (
pip install -r requirements.txt
) - Slack API token
- Token generator page
- Place your token to
api_token.py.tpl
and rename the fileapi_token.py.tpl
→api_token.py
Just run python3 team_access_log.py
. It will show you a progress and produce two files:
raw_data.csv
which contains all downloaded access logs converted from JSON to CSV for further processinglast_logins.csv
which contains an information about last login and a count of inactive days for each user
MIT