Created
February 5, 2019 16:24
-
-
Save trygveaa/8413ec1148ce49065314d0d347642a74 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2 | |
from websocket import create_connection | |
import json | |
import sys | |
import urllib2 | |
rtm = json.loads(urllib2.urlopen('https://api.slack.com/api/rtm.connect?token=' + sys.argv[1]).read()) | |
ws = create_connection(rtm['url']) | |
print(ws.recv()) | |
ws.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment