Created
January 10, 2019 10:27
-
-
Save Smerity/d534d75b186b3f1f29163fbb69d9fc48 to your computer and use it in GitHub Desktop.
List members of a bot's Slack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pprint | |
import requests | |
AUTH_TOKEN = 'xoxb-...' | |
params = {'token': AUTH_TOKEN} | |
r = requests.post('https://slack.com/api/users.list', params=params) | |
for member in r.json()['members']: | |
print(member['id'], member['name']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment