Skip to content

Instantly share code, notes, and snippets.

@trygveaa
Created February 5, 2019 16:24
Show Gist options
  • Save trygveaa/8413ec1148ce49065314d0d347642a74 to your computer and use it in GitHub Desktop.
Save trygveaa/8413ec1148ce49065314d0d347642a74 to your computer and use it in GitHub Desktop.
#!/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