Skip to content

Instantly share code, notes, and snippets.

@d4n13lbc
Last active September 2, 2017 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d4n13lbc/bc6fa04139975d82a637ce3d18d4e70b to your computer and use it in GitHub Desktop.
Save d4n13lbc/bc6fa04139975d82a637ce3d18d4e70b to your computer and use it in GitHub Desktop.

Slack test

pip install slackclient
from slackclient import SlackClient

slack_token = os.environ["SLACK_API_TOKEN"]
sc = SlackClient(slack_token)

sc.api_call(
  "chat.postMessage",
  channel="#python",
  text="Hello from Python! :tada:"
)

References

https://github.com/slackapi/python-slackclient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment