Im trying to get a list of all users on the slack with python. Using users.list gets me the first 1000 users. To get the rest I need to pass in a cursor value. The Cursor value works when I use slack's own tester on it's website.
The users.list method returns 1000 records and if I use the cursor variable( In the slack dev website to test url calls), each call gets me another thousand users.
This is the code that I'm using right now to get a list of users:
client = slack.WebClient(token=os.environ['SLACK_API_TOKEN'])
request=client.api_call("users.list")
According to the slack documentation users.list has an optional argument called cursor to get the next 10000 users. But I cant figure out how to pass the cursor variable along with the users.list command. I've looked at stack overflow to see how others have used users.list but I cant get any instances of that.