Skip to content

Instantly share code, notes, and snippets.

@Smerity
Created January 10, 2019 10:27
Show Gist options
  • Save Smerity/d534d75b186b3f1f29163fbb69d9fc48 to your computer and use it in GitHub Desktop.
Save Smerity/d534d75b186b3f1f29163fbb69d9fc48 to your computer and use it in GitHub Desktop.
List members of a bot's Slack
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