def get_rtm_uri(): rtm = slack.rtm.start() try: body = rtm.body except slacker.Error as e: print(e) return None return body.get('url') # Check if this is the main application running (not imported)