I wanted only ID and name, so for the time being
import requests
import json
url = "https://slack.com/api/users.list"
token = ""
userlist = {}
payload = {"token": token}
response = requests.get(url,params=payload)
user_json = response.json()
for i in user_json["members"]:
userlist[i["id"]] = i["name"]
print(userlist)
I will get involved in various ways from here
Recommended Posts