Skip to content

Instantly share code, notes, and snippets.

@LiamHz
Created September 5, 2018 01:09
Show Gist options
  • Save LiamHz/280b525c2701f40305aa5de6d146ce2e to your computer and use it in GitHub Desktop.
Save LiamHz/280b525c2701f40305aa5de6d146ce2e to your computer and use it in GitHub Desktop.
from slackclient import SlackClient
slack_client = SlackClient(SLACK_OAUTH)
# Print a list of users and their respective IDs
request = slack_client.api_call("users.list")
if request['ok']:
for item in request['members']:
print("{}: {}".format(item['name'], item['id']))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment