python-slack-sdk
python-slack-sdk copied to clipboard
Allow Tokens to be specified per request
Description
Users would like to create one WebClient and specify any team specific data on each request.
What type of issue is this? (place an x in one of the [ ])
- [ ] bug
- [x] enhancement (feature request)
- [ ] question
- [ ] documentation related
- [ ] testing related
- [ ] discussion
Requirements (place an x in each of the [ ])
- [X] I've read and understood the Contributing guidelines and have done my best effort to follow them.
- [X] I've read and agree to the Code of Conduct.
- [X] I've searched for any related issues and avoided creating a duplicate issue.
🎉 This is awesome thanks Rodney!
The implementation will be as below. I'm planning to add this feature in v2.7+
client = WebClient(token="xoxb-111")
client.chat_postMessage(channel="#random", text="Hello!") # with xoxb-111
client.chat_postMessage(token="xoxb-222", channel="#random", text="Hello!") # with xoxb-222