Skip to content

Instantly share code, notes, and snippets.



Last active Jan 11, 2017
What would you like to do?
Slack user keepalive
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN >
<plist version="1.0">
  1. Put somewhere on your system, then change the path in slacktive.plist
  2. Put com.sean.python.slacktive.plist in ~/Library/LaunchAgents/
  3. Add your token to com.sean.python.slacktive.plist (see file comments)
  4. launchctl load ~/Library/LaunchAgents/com.sean.python.slactive.plist
import os
import time
from requests import post
while True:
# Replace x's with your user token.
# Token available from
r = post("", data = {'token': 'xxxxxxxxxxxxxxxxx'})
if r.status_code is not 200:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment